I’m sorry but I’m really struggling with printing…
The issue that I’m having now is that I can’t figure out a way to (refer to the screenshot below):
-Center the borders on the page (notice that they are offcentered).
-Center the drawing from the diagram on the page (notice that it’s in the upper left)
-Scale the drawing to fit the inside of the border
This is what I want it to look like but I’m having the hardest time:
This is my Print Foreground Template:
<DataTemplate x:Key="PrintBorderTemplate">
<Border BorderBrush="Black" BorderThickness="1" Padding="15">
<Border BorderBrush="Black" BorderThickness="1">
<go:SpotPanel Name="PrintingSpotPanel">
<Border BorderBrush="Black" BorderThickness="1" go:SpotPanel.Alignment="BottomRight" go:SpotPanel.Spot="BottomRight" Margin="-1,-1,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.562*"/>
<RowDefinition Height="0.438*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.231*"/>
<ColumnDefinition Width="0.269*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="SketchTDYLogoText" Text="Our Company Name" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" Margin="4" />
<TextBlock x:Name="SketchDate" Grid.Row="1" Grid.Column="0" Text="{Binding Today, Source={StaticResource Static}, Converter={StaticResource Formatter}, ConverterParameter='MM/dd/yyyy'}" d:LayoutOverrides="Height" Grid.RowSpan="2" Margin="2" />
<TextBlock x:Name="SketchTitle" Grid.Column="1" Text="{Binding ProjectTitle, Source={StaticResource getProjectTitle}}" Grid.RowSpan="2" Grid.Row="1" Margin="2" />
<TextBlock x:Name="SketchPlaceHolder" Grid.Column="2" Text="Part Number" Grid.RowSpan="2" Grid.Row="1" Margin="2" />
</Grid>
</Border>
</go:SpotPanel>
</Border>
</Border>
</DataTemplate>
and by Diagram with PrintManager stuff defined:
<go:Diagram x:Name="myDiagram" Padding="10"
SelectionChanged="myDiagram_SelectionChanged"
<span ="Apple-tab-span" style="white-space:pre"> </span>HorizontalContentAlignment="Stretch"
<span ="Apple-tab-span" style="white-space:pre"> </span>VerticalContentAlignment="Stretch"
<span ="Apple-tab-span" style="white-space:pre"> </span>NodeTemplateDictionary="{StaticResource NodeTemplateDictionary}"
<span ="Apple-tab-span" style="white-space:pre"> </span>AllowDrop="True"
<span ="Apple-tab-span" style="white-space:pre"> </span>LinkTemplate="{StaticResource LinkTemplate}"
MinWidth="100">
<go:Diagram.PrintManager>
<go:PrintManager Scale="NaN" ForegroundTemplate="{StaticResource PrintBorderTemplate}"
PageOptions="FullGridBackground"
/>
</go:Diagram.PrintManager>
</go:Diagram>
Is there any way for me to get the printout to display the way I want?
I’m using Silverlight 5 and GoXam 1.3.2.5