This is a migrated thread and some comments may be shown as answers.

custom node style

1 Answer 51 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Ant
Top achievements
Rank 1
Ant asked on 20 Jan 2014, 07:10 PM
Hi

Using the GraphSource for binding with Nodes and Links is it possible to style nodes within code and not using StyleSelectors? E.g. change a node to a elipse or triangle

Thanks

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 23 Jan 2014, 10:05 AM
Hi Ant,

In order to control the Geometry property in your ViewModel you can expose a string property and bind it in a Style like this:

<Style TargetType="telerik:RadDiagramShape">
    <Setter Property="Geometry" Value="{Binding Geometry,Mode=TwoWay}"/>
</Style>
Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Diagram
Asked by
Ant
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or