Esempio n. 1
0
 public FontInfo(FontFamily fam, double sz, FontStyle style, FontStretch strc, FontWeight weight, SolidColorBrush c, SolidColorBrush background)
 {
     this.Family     = fam;
     this.Size       = sz;
     this.Style      = style;
     this.Stretch    = strc;
     this.Weight     = weight;
     this.BrushColor = c;
     this.Background = AvailableColors.GetFontColor(background);
 }
Esempio n. 2
0
        public static int GetFontColorIndex(FontColor c)
        {
            AvailableColors brushList  = new AvailableColors();
            int             idx        = 0;
            SolidColorBrush colorBrush = c.Brush;

            foreach (FontColor brush in brushList)
            {
                if (brush.Brush.Color.Equals(colorBrush.Color))
                {
                    break;
                }
                idx++;
            }
            return(idx);
        }
Esempio n. 3
0
 public static FontColor GetFontColor(Color c)
 {
     return(AvailableColors.GetFontColor(new SolidColorBrush(c)));
 }
Esempio n. 4
0
 public ColorPickerViewModel()
 {
     this.selectedFontColor = AvailableColors.GetFontColor(Colors.Black);
     this.roFontColors      = new ReadOnlyCollection <FontColor>(new AvailableColors());
 }