Hello,
I am trying to create a Diagram, using RadDiagram, and I want to apply some custom styles using StyleSelectors.
My main issue is that when I apply a ShapeStyle to a RadDiagram (even static) then the shapes disappear!The same happens with the connections.
Even the simplest examples from Customize the RadDiagramShape Style do not work! I use Telerik 2017.3.1018.45.NoXaml version and I have added the following dictionaries:
<ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/System.Windows.xaml" /><ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.xaml" /><ResourceDictionary Source="/Telerik.Windows.Themes.Summer;component/Themes/Telerik.Windows.Controls.Diagrams.xaml" />
My MainWindow.Xaml
<Window x:Class="TestingDiagram.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:TestingDiagram" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.Resources> <Style TargetType="telerik:RadDiagramShape" x:Key="CustomShapeStyle"> <Setter Property="Background" Value="LightGreen" /> <Setter Property="FontWeight" Value="Bold" /> </Style> </Grid.Resources> <telerik:RadDiagram x:Name="xDiagram" ShapeStyle="{StaticResource CustomShapeStyle}"> <telerik:RadDiagramShape x:Name="shape1" Position="20,20" Content="Shape 1" /> <telerik:RadDiagramShape x:Name="shape2" Position="220,20" Content="Shape 2" /> <telerik:RadDiagramConnection Source="{Binding ElementName=shape1}" Target="{Binding ElementName=shape2}" /> </telerik:RadDiagram> </Grid></Window>Thanks in advance
Dimitris
