Example #1
0
        // Static constructor.
        static NamedBrush()
        {
            BrushNameProperty = DependencyProperty.Register("BrushName", typeof(string), typeof(NamedBrush));
            BrushProperty     = DependencyProperty.Register("Brush", typeof(Brush), typeof(NamedBrush));

            PropertyInfo[] props = typeof(Brushes).GetProperties();
            nbrushes = new NamedBrush[props.Length];
            for (int i = 0; i < props.Length; i++)
            {
                nbrushes[i] = new NamedBrush(props[i].Name, (Brush)props[i].GetValue(null, null));
            }
        }
 public void ScrollIntoView(NamedBrush namedBrush)
 {
     List.ScrollIntoView(namedBrush);
 }