예제 #1
0
    /// <summary>
    /// Parses a SolidColorBrush element.
    /// </summary>
    SolidColorBrush ParseSolidColorBrush()
    {
      Debug.Assert(this.reader.Name == "SolidColorBrush");
      SolidColorBrush brush = new SolidColorBrush();
      while (MoveToNextAttribute())
      {
        switch (this.reader.Name)
        {
          case "Opacity":
            brush.Opacity = ParseDouble(this.reader.Value);
            break;

          case "Color":
            brush.Color = Color.Parse(this.reader.Value);
            break;

          case "x:Key":
            brush.Key = this.reader.Value;
            break;
        }
      }
      MoveBeyondThisElement();
      return brush;
    }
예제 #2
0
파일: Brush.cs 프로젝트: alexiej/YATE
 internal static Brush Parse(string value)
 {
   SolidColorBrush brush = new SolidColorBrush();
   brush.Color = Color.Parse(value);
   return brush;
 }