public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { RootChildDirection type = (RootChildDirection)value; if (type == RootChildDirection.Left) { return("M0,10 L 10,0 L10,20z"); } else { return("M 0 0 L 10 10 L 0 20 Z"); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { RootChildDirection type = (RootChildDirection)value; if (type == RootChildDirection.Left) { return(HorizontalAlignment.Left); } else { return(HorizontalAlignment.Right); } }
public RootChild(RootChildDirection direction) { Direction = direction; Children = new ObservableCollection <Child>(); this.Annotations = new AnnotationCollection() { new TextAnnotationViewModel() { Text = "New Topic", EditTemplate = GetEditTemplate(), TextWrapping = TextWrapping.Wrap } }; Constraints &= ~(NodeConstraints.InheritDraggable | NodeConstraints.InheritResizable | NodeConstraints.InheritRotatable); if (direction == RootChildDirection.Right) { Constraints |= (NodeConstraints.ResizeEast); } else if (direction == RootChildDirection.Left) { Constraints |= (NodeConstraints.ResizeWest); } ShapeName = "Rectangle"; ThemeStyleId = StyleId.Variant3; }
public MindmapEmployee GetEmployee(string id, string name, string color, string parent = default(string), RootChildDirection direction = RootChildDirection.Left) { return(new MindmapEmployee() { EmpId = id, Name = name, Color = color, ParentId = parent, Direction = direction }); }