/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/// <summary> /// Преобразует цвет WPF в цвет WindowsForms /// </summary> /// <param name="color">Цвет WPF</param> /// <returns>Цвет Windows Forms</returns> public static System.Drawing.Color ToColor(this System.Windows.Media.Color color) { return Color.FromArgb(color.A, color.R, color.G, color.B); } /// <summary> /// Преобразует цвет Windows Forms в цвет WPF /// </summary> /// <param name="color">Цвет WindowsForms</param> /// <returns>Цвет WPF</returns> public static System.Windows.Media.Color ToColor(this System.Drawing.Color color) { return System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B); }