Пример #1
0
		public static FrameworkElement Create (FrameworkElement content, TreeController controller)
		{
			var panel = new StackPanel { Orientation = swc.Orientation.Horizontal };
			var button = new TreeToggleButton { Controller = controller, Width = 16 };
			panel.Children.Add (button);
			panel.DataContextChanged += (sender, e) => button.Configure(panel.DataContext as ITreeGridItem);
			panel.Children.Add (content);
			return panel;
		}
Пример #2
0
        public static FrameworkElement Create(FrameworkElement content, TreeController controller)
        {
            var dock   = new DockPanel();
            var button = new TreeToggleButton {
                Controller = controller, Width = 16
            };

            DockPanel.SetDock(button, Dock.Left);
            dock.Children.Add(button);
            dock.DataContextChanged += (sender, e) => button.Configure(dock.DataContext as ITreeGridItem);
            dock.Children.Add(content);
            return(dock);
        }
Пример #3
0
        public TreeTogglePanel(FrameworkElement content, TreeController controller)
        {
            Background = swm.Brushes.Transparent;             // needed?
            button     = new TreeToggleButton {
                Controller = controller, Width = 16
            };
            SetDock(button, Dock.Left);
            Children.Add(button);
            Children.Add(content);
            _content = content;

            DataContextChanged += OnDataContextChanged;
        }
Пример #4
0
        public static FrameworkElement Create(FrameworkElement content, TreeController controller)
        {
            var panel = new StackPanel {
                Orientation = Orientation.Horizontal
            };
            var button = new TreeToggleButton {
                Controller = controller, Width = 16
            };

            panel.Children.Add(button);
            panel.DataContextChanged += (sender, e) => button.Configure(panel.DataContext as ITreeGridItem);
            panel.Children.Add(content);
            return(panel);
        }