protected override void OnInitialized(EventArgs e) { base.OnInitialized(e); DataContext = new YuriDiagramViewModel(); BehaviorCollection bhcol = Interaction.GetBehaviors(this); bhcol.Add(new DiagramElementDragBehavior()); bhcol.Add(new DrawLineDragBehavior()); bhcol.Add(new DrawLineDropBehavior()); }
public YuriDiagram() : base() { DataContext = new YuriDiagramViewModel(); }