This question is locked. New answers and comments are not allowed.
hello,
I try to bind to some properties of the diagram, bu SelectedItem does not trigger. This is how i bind in constructur of my Custom class
public class CLOCDiagram : Control, IDisposable{ public CLOCDiagram() { this.DefaultStyleKey = typeof(CLOCDiagram); Binding sourceBinding = new Binding("Source"); sourceBinding.Source = this; sourceBinding.Mode = BindingMode.TwoWay; this.Diagram.SetBinding(RadDiagram.GraphSourceProperty, sourceBinding); Binding selectedItemBinding = new Binding("SelectedItem"); selectedItemBinding.Source = this; selectedItemBinding.Mode = BindingMode.TwoWay; selectedItemBinding.Converter = new ItemToNodeConverter() { Diagram = this.Diagram }; this.Diagram.SetBinding(RadDiagram.SelectedItemProperty, selectedItemBinding); }
And this is my dependency property.
public object SelectedItem { get { return (object)this.GetValue(SelectedItemProperty); } set { this.SetValue(SelectedItemProperty, value); } }public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register("SelectedItem", typeof(object), typeof(CLOCDiagram), null);However, graphsourceproperty works great but, SelectedItem Binding does not hit when I select a node or link in the diagram.
What I try to do, is replacing a node with other one. So I need to get selected node only.
Any suggestion please?
Regards