Beispiel #1
0
 public WPFTreeNodeDrawer(Panel parent, WPFTreeNodeDrawerSettings settings)
 {
     this.parent   = parent;
     this.settings = settings;
     this.parent.Children.Add(drawingHost);
     this.drawingHost.VerticalAlignment   = VerticalAlignment.Top;
     this.drawingHost.HorizontalAlignment = HorizontalAlignment.Left;
 }
Beispiel #2
0
        public static WPFTreeNodeDrawerSettings CreateDefault()
        {
            var settings = new WPFTreeNodeDrawerSettings()
            {
                NodeSelectedColor      = new SolidColorBrush(Color.FromArgb(120, 200, 200, 200)),
                NodeColor              = new SolidColorBrush(Colors.Aqua),
                LineThickness          = 0.8f,
                LineColor              = new SolidColorBrush(Colors.Black),
                FontSize               = 12,
                FontCultureInfo        = new CultureInfo("en-us"),
                FontFamily             = new FontFamily("Gil Sans MT"),
                FontColor              = new SolidColorBrush(Colors.Black),
                TextPositionCorrection = new System.Windows.Point(6, 2),
                BackgroundColor        = new SolidColorBrush(Colors.White)
            };

            settings.NodeSelectedColor.Freeze();
            settings.LineColor.Freeze();
            settings.NodeColor.Freeze();
            settings.FontColor.Freeze();
            settings.BackgroundColor.Freeze();
            return(settings);
        }