Hi,
I am working in silverlight and i have one Grid with many Rows.
In My Grid Row there are many control for display purpose.
Now i want to print this Grid with all row.
I found many solution for PrintDocument in Silverlight but it print only first page multiple time.
My code is like,
void btnPrint_Click(object sender, RoutedEventArgs e)
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += new EventHandler<PrintPageEventArgs>(pd_PrintPage);
pages.Add(grdMain);
pd.Print("Title1");
}
void pd_PrintPage(object sender, PrintPageEventArgs e)
{
e.PageVisual = grdMain;
e.HasMorePages = true;
}
When i add e.HasMorePages = true that time it will going to infinite loop and does not print.
Please help me...