Hi,
I can make my own RadDiagramShape Style:
<
Style
TargetType
=
"telerik:RadDiagramShape"
x:Key
=
"ShapeStyle"
>
<
Setter
Property
=
"Width"
Value
=
"200"
/>
<
Setter
Property
=
"Height"
Value
=
"80"
/>
<
Setter
Property
=
"FontSize"
Value
=
"16"
/>
<
Setter
Property
=
"StrokeThickness"
Value
=
"1"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Black"
/>
<
Setter
Property
=
"Stroke"
Value
=
"Black"
/>
<
Setter
Property
=
"Background"
>
<
Setter.Value
>
<
LinearGradientBrush
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#FFB0B0FB"
Offset
=
"0"
/>
<
GradientStop
Color
=
"#FF3C2ECA"
Offset
=
"0.527"
/>
<
GradientStop
Color
=
"#FF746BCC"
Offset
=
"0.987"
/>
</
LinearGradientBrush
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
telerik:RadDiagram
Grid.Row
=
"1"
IsRotationEnabled
=
"False"
AllowDrop
=
"True"
SelectionChanged
=
"MainDiagram_SelectionChanged"
ShapeStyle
=
"{StaticResource ShapeStyle}"
ConnectionStyle
=
"{StaticResource ConnectionStyle}"
ConnectionBridge
=
"Gap"
IsPanEnabled
=
"True"
x:Name
=
"MainDiagram"
>
<
telerik:RadDiagramToolbox
x:Name
=
"MainToolBox"
IsEnabled
=
"{Binding ActiveStructuur, Converter={StaticResource NullToBoolConverter}}"
HorizontalAlignment
=
"Stretch"
Title
=
"Gallery"
Header
=
"ToolBox"
IsOpen
=
"False"
/>
From code behind and the ToolBox these are respected: FontSize, StrokeThickness, BorderBrush, Stroke, Background.
But not the width and height when I drag from the ToolBox.
They are respected when I add the shape from code behind.
Is there a way to make the ToolBox respect the width and height I specified in the style?
Regards,
Bayram