Ejemplo n.º 1
0
        public void FromNameTests(KnownColor knownColor)
        {
            var splatColor = SplatColor.FromName(knownColor.ToString());

            Assert.NotNull(splatColor.Name);
        }
Ejemplo n.º 2
0
        public void FromKnownColorTests(KnownColor knownColor)
        {
            var splatColor = SplatColor.FromKnownColor(knownColor);

            Assert.NotNull(splatColor.Name);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Converts a <see cref="SplatColor"/> into the XAML <see cref="SolidColorBrush"/>.
 /// </summary>
 /// <param name="value">The color to convert.</param>
 /// <returns>The <see cref="SolidColorBrush"/> generated.</returns>
 public static SolidColorBrush ToNativeBrush(this SplatColor value)
 {
     return(new SolidColorBrush(value.ToNative()));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Converts a XAML color into the XAML <see cref="SplatColor"/>.
 /// </summary>
 /// <param name="value">The color to convert.</param>
 /// <returns>The <see cref="SplatColor"/> generated.</returns>
 public static SplatColor FromNative(this Color value)
 {
     return(SplatColor.FromArgb(value.A, value.R, value.G, value.B));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Converts a <see cref="SplatColor"/> into the XAML color.
 /// </summary>
 /// <param name="value">The color to convert.</param>
 /// <returns>The XAML color generated.</returns>
 public static Color ToNative(this SplatColor value)
 {
     return(Color.FromArgb(value.A, value.R, value.G, value.B));
 }