Hi walter,
I m facing issue while binding to my custom header property…
If i bind with Diagram.Model.Name in data template, its showing model name properly in header.
But If i bind with my header Properties from ViewModel its not displaying property value.
I tried with two different ways of binding, nothing is working.
Kindly help me how to bind this data template to my viewmodel’s properties.
<DataTemplate x:Key="PrintBorderTemplate">
<go:SpotPanel>
<!-- header -->
<StackPanel go:SpotPanel.Spot="MiddleTop" go:SpotPanel.Alignment="MiddleBottom" VerticalAlignment="Top" HorizontalAlignment="Center" >
<TextBlock FontSize="20" Text="Binding Path=DataContext.Header1, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
<!-- or-->
<TextBlock Text="{Binding DataContext.Header2}" FontSize="28" />
</StackPanel>
</go:SpotPanel>
</DataTemplate>
custom print manager for my diagram…
<go:Diagram.PrintManager>
<local:PreviewingPrintManager ForegroundTemplate="{StaticResource PrintBorderTemplate}"
PageOptions="FullGridBackground" Margin="30 70 30 70" />
</go:Diagram.PrintManager>
Kindly help me how to bind this data template to my viewmodel’s properties.