Пример #1
0
        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");
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 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;
 }
Пример #4
0
 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
     });
 }