Is there a simple example or recommended way to bind the the location (either position or X/Y coordinates) to the Node item in the GraphSource? I'd like to store/restore this position data back to the diagram when the user returns.
This is what I've tried, and it isn't working. Apparently the position of the RadDiagramShape isn't being reflected on the screen.
ViewModel --> has a populated 'Position' observable value (Point(x, y)).
<DataTemplate x:Key="shapeTemplate">
<StackPanel Orientation="Vertical">
<telerik:RadDiagramShape Content="{Binding RawShape}"
Background="{Binding ShapeColor}"
Width="60"
Height="60"
Position="{Binding Position}"
Style="{StaticResource RadDiagramShapeStyle}" />
<TextBlock HorizontalAlignment="Center" Text="{Binding WorkflowTask.TaskName}" />
</StackPanel>
</DataTemplate>
<telerik:RadDiagram x:Name="diagram"
GraphSource="{Binding GraphSourceObject}"
ConnectionStyle="{StaticResource LinkStyle}"
ConnectionTemplate="{StaticResource LinkTemplate}"
ShapeTemplate="{StaticResource shapeTemplate}"
SelectionMode="{Binding SelectionMode, Converter={StaticResource DiagramSelectionModeConverter}}"
UseLayoutRounding="False"
AllowCopy="False"
AllowDelete="False"
AllowCut="False"
AllowDrop="False"
AllowPaste="False"
IsPanEnabled="True"
IsDraggingEnabled="True"
IsEditable="True"
IsZoomEnabled="True"
IsInformationAdornerVisible="False"
IsManipulationAdornerVisible="False"
IsConnectorsManipulationEnabled="False"
IsBackgroundSurfaceVisible="True"
IsMouseCaptured="True"
IsRotationEnabled="False"
IsResizingEnabled="False"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto">
This is what I've tried, and it isn't working. Apparently the position of the RadDiagramShape isn't being reflected on the screen.
ViewModel --> has a populated 'Position' observable value (Point(x, y)).
<DataTemplate x:Key="shapeTemplate">
<StackPanel Orientation="Vertical">
<telerik:RadDiagramShape Content="{Binding RawShape}"
Background="{Binding ShapeColor}"
Width="60"
Height="60"
Position="{Binding Position}"
Style="{StaticResource RadDiagramShapeStyle}" />
<TextBlock HorizontalAlignment="Center" Text="{Binding WorkflowTask.TaskName}" />
</StackPanel>
</DataTemplate>
<telerik:RadDiagram x:Name="diagram"
GraphSource="{Binding GraphSourceObject}"
ConnectionStyle="{StaticResource LinkStyle}"
ConnectionTemplate="{StaticResource LinkTemplate}"
ShapeTemplate="{StaticResource shapeTemplate}"
SelectionMode="{Binding SelectionMode, Converter={StaticResource DiagramSelectionModeConverter}}"
UseLayoutRounding="False"
AllowCopy="False"
AllowDelete="False"
AllowCut="False"
AllowDrop="False"
AllowPaste="False"
IsPanEnabled="True"
IsDraggingEnabled="True"
IsEditable="True"
IsZoomEnabled="True"
IsInformationAdornerVisible="False"
IsManipulationAdornerVisible="False"
IsConnectorsManipulationEnabled="False"
IsBackgroundSurfaceVisible="True"
IsMouseCaptured="True"
IsRotationEnabled="False"
IsResizingEnabled="False"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto">