Hi!
I have been using the RadDiagram for a few weeks now and came across a problem when I tried to align the content on the connection between two shapes. I have defined a template for the RadDiagramConnection and the RouteConnections is set to True on the diagram. On the connection an image is shown that I can not align vertically. I tried using text instead of an image but result is the same. What am I doing wrong?
Is there perhaps a way to define a template for connectors?
I have pasted below the code of both elements and the image of problem.
<Style TargetType="telerik:RadDiagram" >
<Setter Property="AllowCopy" Value="False" />
<Setter Property="AllowCut" Value="False" />
<Setter Property="AllowDelete" Value="False" />
<Setter Property="AllowPaste" Value="False" />
<Setter Property="IsConnectorsManipulationEnabled" Value="False" />
<Setter Property="IsInformationAdornerVisible" Value="False" />
<Setter Property="IsManipulationAdornerVisible" Value="True" />
<Setter Property="IsResizingEnabled" Value="False" />
<Setter Property="IsRotationEnabled" Value="False" />
<Setter Property="IsSnapToItemsEnabled" Value="False" />
<Setter Property="IsEditable" Value="False" />
<Setter Property="IsSnapToGridEnabled" Value="False" />
<Setter Property="ActiveTool" Value="PointerTool" />
<Setter Property="SelectionMode" Value="Extended" />
<Setter Property="IsBackgroundSurfaceVisible" Value="True" />
<Setter Property="RectSelectionMode" Value="Partial" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="MinWidth" Value="500" />
<Setter Property="RouteConnections" Value="True" />
<Setter Property="telerik:DiagramSurface.IsVirtualizing" Value="False" />
<Setter Property="telerik:DiagramAnimations.IsPanAnimationEnabled" Value="False" />
<Setter Property="telerik:DiagramAnimations.IsZoomAnimationEnabled" Value="False" />
<Setter Property="telerik:DiagramAnimations.AnimationDuration" Value="0.2" />
<Setter Property="primitives:BackgroundPageGrid.IsGridVisible" Value="False" />
</Style>
<Style TargetType="telerik:RadDiagramConnection" >
<Setter Property="telerik:RadDiagramConnection.IsAutoUpdateSuppressed" Value="True" />
<Setter Property="Visibility" Value="{Binding Visibility, Mode=TwoWay}" />
<Setter Property="ConnectionType" Value="Polyline" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="TargetCapType" Value="Arrow1Filled" />
<Setter Property="Stroke" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}" />
<Setter Property="StrokeThickness" Value="2" />
<Setter Property="VerticalContentAlignment" Value="Top"></Setter>
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<Image Source="{Binding Converter={StaticResource imageSourceBasedOnNodeType}}" Width="30" Height="30" Margin="10 10 10 10"
ToolTip="{Binding Path=.Target.TransformationTypeDesc}"
Visibility="{Binding Converter={StaticResource imageVisibilityBasedOnType}}"></Image>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>