hi all
i have grid like
<Grid x:Name="grid1" Visibility="Visible" Margin="14.717,241,0,99.685" HorizontalAlignment="Left" Width="401.283">
<Label Margin="90,27,197,0" Name="label12" FontSize="12" Height="26" VerticalAlignment="Top" FontWeight="Bold"></Label>
<Label Margin="197,27,88,0" Name="label13" FontSize="12" Height="25" VerticalAlignment="Top" FontWeight="Bold">DATE:</Label>
<Label HorizontalAlignment="Left" Margin="11,46.685,0,0" Name="label15" Width="80" FontSize="12" FontWeight="Bold" Height="29.315" VerticalAlignment="Top">VEHICLE No:</Label>
<Label Margin="11,0,0,20" Name="label16" FontSize="12" FontWeight="Bold" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="124.545">PRICE :</Label>
<Label Margin="11,0,0,37" Name="label17" FontSize="12" FontWeight="Bold" HorizontalAlignment="Left" Width="124.545" Height="30.315" VerticalAlignment="Bottom">TOTAL TIME:</Label>
<Label Margin="197,48,76,0" Name="label18" FontSize="12" FontWeight="Bold" Height="29.315" VerticalAlignment="Top">ARRIVAL TIME:</Label>
<Label Margin="90,49,197,0" Name="label21" FontSize="12" FontWeight="Bold" Height="29.315" VerticalAlignment="Top"></Label>
<Label Margin="197,66,76,87.315" Name="label23" FontSize="12" FontWeight="Bold">DEPARTURE TIME</Label>
<Label HorizontalAlignment="Left" Margin="11,24.685,0,0" Name="label11" Width="80" FontSize="12" Height="25" VerticalAlignment="Top" FontWeight="Bold">Token No :</Label>
<Label FontSize="12" Height="25" HorizontalAlignment="Right" Margin="0,28,-40.76,0" Name="label28" VerticalAlignment="Top" Width="124" FontWeight="Bold"></Label>
<Label FontSize="12" HorizontalAlignment="Right" Margin="0,48,-9.828,0" Name="label29" Width="93.068" FontWeight="Bold" Height="28" VerticalAlignment="Top"></Label>
<Label FontSize="12" HorizontalAlignment="Right" Margin="0,66,-40.76,90" Name="label30" Width="124" FontWeight="Bold"></Label>
<Label FontSize="12" Margin="109,0,165,37" Name="label31" FontWeight="Bold" Height="30.315" VerticalAlignment="Bottom"></Label>
<Label FontSize="12" Margin="109,0,167,20" Name="label14" FontWeight="Bold" Height="27" VerticalAlignment="Bottom"></Label>
</Grid>
When I clicking button
am getting printo out but it is printing whole window
except grid all remaining part left white space
i need to print only particular content in grid
i have write code like
PrintDialog dialog = new PrintDialog();
if (dialog.ShowDialog() == true)
{ dialog.PrintVisual(grid1, "My Canvas"); }
here i need to get print on only grid content not all the window
please can any one please help me.