Пример #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));
            }
        }
Пример #2
0
 public void ScrollIntoView(NamedBrush namedBrush)
 {
     List.ScrollIntoView(namedBrush);
 }