Monday, December 10, 2012

Silverlight / XAML Grid Printing issue

Silverlight / XAML Grid Printing issue

I am trying to create a letter using Infragistic/Silverlight, but the letter contents are getting overlapped and its printing only 3-4 lines of whole letter, where the rest of lines gets overlap within it.

Let me know, what I am doing wrong because when I see the XAML design page, it shows me the contents well drafted as I want.

Any ideas.

I am presuming, I am doing something wrong with the row or column definition. Let me know, if I need to paste my XAML.

<UserControl x:Class="Prospects.Controls.SalesRFILetter" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"          xmlns:Controls="clr-namespace:Prospects.Controls" xmlns:rtc="clr-namespace:Prospects.Converters" mc:Ignorable="d" d:DesignHeight="1342" d:DesignWidth="1035">  <UserControl.Resources>     <rtc:DateToDayMonthYearConverter x:Key="DateToDayMonthYearConverter" />     <rtc:DateToTimeValueConverter x:Key="DateToTimeValueConverter"/>     <Controls:SalesRFILetterViewModel x:Key="ViewModel" />     <!--<Style x:Key="NormalText"  TargetType="TextBlock" >         <Setter Property="FontFamily" Value="Calibri"/>         <Setter Property="FontSize" Value="15" />         <Setter Property="FontWeight" Value="Normal" />     </Style>--> </UserControl.Resources>  <Grid x:Name="LayoutRoot" Width="780" Height="auto" DataContext="{Binding Source={StaticResource ViewModel}}" Loaded="LayoutRoot_Loaded">     <Grid.RowDefinitions>         <RowDefinition Height="Auto" />         <RowDefinition Height="*" />         <RowDefinition Height="5" />     </Grid.RowDefinitions>     <Grid Grid.Row="1" Height="Auto" HorizontalAlignment="Stretch" Name="confirmationLetter" Margin="1" VerticalAlignment="Stretch" Width="Auto">         <Grid.RowDefinitions>             <RowDefinition Height="Auto"/>         </Grid.RowDefinitions>         <Grid Grid.Row="0" Height="Auto" HorizontalAlignment="Stretch" Margin="70,70,70,70" VerticalAlignment="Stretch" Width="Auto" >             <Grid.RowDefinitions>                 <!-- Space for Letter head Row = 0 -->                 <RowDefinition Height="auto" />                 <!-- Date & Address Row = 1 -->                 <RowDefinition MinHeight="150" Height="Auto" />                 <!-- Dear contact name Row = 2-->                 <RowDefinition Height="Auto" />                 <!-- letter body Row = 3 -->                 <RowDefinition Height="Auto" />                 <!-- letter signature Row = 4 -->                 <RowDefinition Height="60" />                 <RowDefinition Height="12*" />             </Grid.RowDefinitions>              <!-- Contact name and address -->             <Grid Grid.Row="1">                 <Grid.ColumnDefinitions>                     <ColumnDefinition Width="*" />                     <ColumnDefinition Width="*" />                 </Grid.ColumnDefinitions>                 <Grid.RowDefinitions>                     <RowDefinition Height="Auto" /> <!--Row = 0-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 1-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 2-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 3-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 4-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 5-->                     <!--<RowDefinition Height="Auto" />--> <!--Row = 6-->                 </Grid.RowDefinitions>                 <TextBlock Grid.Column="1" Grid.Row="0" Text="Today" HorizontalAlignment="Right"/>                 <!--<TextBlock Grid.Column="0" Grid.Row="0" Text="ContactName" VerticalAlignment="Stretch"/>-->                 <!--<TextBlock Grid.Column="0" Grid.Row="1" Text="BusinessName" VerticalAlignment="Stretch"/>                 <TextBlock Grid.Column="0" Grid.Row="2" Text="Address1" VerticalAlignment="Stretch"/>                 <TextBlock Grid.Column="0" Grid.Row="3" Text="Address2" VerticalAlignment="Stretch"/>                 <TextBlock Grid.Column="0" Grid.Row="4" Text="Town" VerticalAlignment="Stretch"/>                 <TextBlock Grid.Column="0" Grid.Row="5" Text="County" VerticalAlignment="Stretch"/>                 <TextBlock Grid.Column="0" Grid.Row="6" Text="Postcode" VerticalAlignment="Stretch"/>-->             </Grid>              <!-- Dear Contact name -->             <StackPanel Grid.Row="2" Orientation="Horizontal">                 <TextBlock Padding="5,5,2,5">Dear</TextBlock>                 <TextBlock Padding="2,5,8,5" Text="ContactName"/>             </StackPanel>              <!-- Letter Body -->             <StackPanel Grid.Row="3" Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >                 <!--<TextBlock Style="{StaticResource NormalText}" TextWrapping="Wrap" Height="Auto"  Padding="5" Width="620" HorizontalAlignment="Left" VerticalAlignment="Stretch">                         Following our recent telephone discussions regarding the business rates at your property,                          I am writing to further introduce CVS and our specialised commercial rating service                          and also to confirm the appointment which has been arranged for :-                 </TextBlock>-->                 <!--<TextBlock Style="{StaticResource NormalText}" FontWeight="Bold" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5" HorizontalAlignment="Left" VerticalAlignment="Stretch">                 </TextBlock>                  <TextBlock Style="{StaticResource NormalText}" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5" HorizontalAlignment="Left" VerticalAlignment="Stretch">I am happy to attach or corporate brochure, which comprehensively introduces you to our rating                          service and explains how the appeal process is structured. Whatever the outcome of the appeal                          placed on your behalf, CVS&#160;<Bold>guarantee</Bold>&#160;a fair assessment of your property. With this in mind our                          fee structure has been established on a results only 'No Win, No Fee' basis, meaning that only                          if your allocated surveyor obtains a reduction in your business rate payments would any fees be due.                 </TextBlock>                  <TextBlock Style="{StaticResource NormalText}" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5" HorizontalAlignment="Left" VerticalAlignment="Stretch">                         <TextBlock.Inlines>                             <Run>As previously discussed all we require from you is that you have copies of your&#160;</Run>                             <Run>&#160;rates bills and any other relevant documentation available on the property, for&#160;</Run>                             <Run>&#160;to take away for further analysis.</Run>                         </TextBlock.Inlines>                 </TextBlock>                  <TextBlock Style="{StaticResource NormalText}" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5" HorizontalAlignment="Left" VerticalAlignment="Stretch">                         May I once again thank you for your valuable time taken to discuss your rating matters with CVS.                 </TextBlock>                  <TextBlock Style="{StaticResource NormalText}" Width="620" TextWrapping="Wrap" Height="Auto"  Padding="5,5,3,5" HorizontalAlignment="Left" VerticalAlignment="Stretch">                         <TextBlock.Inlines>                             <Run>Should you have any queries, please do not hesitate to contact me on&#160;</Run>                             <Run Text="."/>                         </TextBlock.Inlines>                 </TextBlock>                 <TextBlock Style="{StaticResource NormalText}" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5,15,5,5" HorizontalAlignment="Left" VerticalAlignment="Stretch">                         Yours Sincerely,                 </TextBlock>-->              </StackPanel>              <!-- Signature -->             <StackPanel Grid.Row="5" Orientation="Vertical">                 <TextBlock TextWrapping="Wrap" Height="Auto" Width="620" Padding="5,5,5,1" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>                 <TextBlock FontWeight="Bold" TextWrapping="Wrap" Height="Auto" Width="620" Padding="5,0,5,1" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>                 <TextBlock TextWrapping="Wrap" Height="Auto" Width="620" Padding="5,0,5,1" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>             </StackPanel>          </Grid>     </Grid> </Grid> 

Answers & Comments...




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog