I'm using the StyleSelectors_WPF example. I'm able to conditionally set both the shape and the connector. However, I'd also like SettingsPaneView to be set based on the ShapeType I've selected. Do you have an example of how to do this?
I'm currently using this style for everything. However, it should only apply to my GroupNode where I have ID and Description. Now, when I have a PersonNode, I need it to display ID, FirstName and LastName fields. Thanks in advance for your help:
I'm currently using this style for everything. However, it should only apply to my GroupNode where I have ID and Description. Now, when I have a PersonNode, I need it to display ID, FirstName and LastName fields. Thanks in advance for your help:
<
Style
TargetType
=
"extensions:SettingsPaneView"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"extensions:SettingsPaneView"
>
<
Border
Background
=
"{TemplateBinding Background}"
BorderThickness
=
"1"
BorderBrush
=
"{StaticResource SettingsPaneBorderBrush}"
>
<
GroupBox
Header
=
"Group Properties"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"26"
/>
<
RowDefinition
Height
=
"26"
/>
</
Grid.RowDefinitions
>
<
Grid
Grid.Row
=
"0"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"125"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
Label
Grid.Column
=
"0"
Content
=
"ID:"
HorizontalAlignment
=
"Right"
FontSize
=
"12"
Foreground
=
"Black"
/>
<
TextBox
Grid.Column
=
"1"
Margin
=
"10,0,10,0"
extensions:SettingsPaneView.EditorPropertyName
=
"DataContext.ID"
extensions:SettingsPaneView.EditorItemType
=
"Shapes, Custom"
extensions:SettingsPaneView.EditorValue
=
"{Binding Path=Text, Mode=TwoWay, RelativeSource={RelativeSource Self}}"
/>
</
Grid
>
<
Grid
Grid.Row
=
"1"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"125"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
Label
Grid.Column
=
"0"
Content
=
"Name:"
HorizontalAlignment
=
"Right"
FontSize
=
"12"
Foreground
=
"Black"
/>
<
TextBox
Grid.Column
=
"1"
Margin
=
"10,0,10,0"
extensions:SettingsPaneView.EditorPropertyName
=
"DataContext.Description"
extensions:SettingsPaneView.EditorItemType
=
"Shapes, Custom"
extensions:SettingsPaneView.EditorValue
=
"{Binding Path=Text, Mode=TwoWay, RelativeSource={RelativeSource Self}}"
/>
</
Grid
>
</
Grid
>
</
GroupBox
>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>