本文整理匯總了C#中Color.ToWpf方法的典型用法代碼示例。如果您正苦於以下問題:C# Color.ToWpf方法的具體用法?C# Color.ToWpf怎麽用?C# Color.ToWpf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Color
的用法示例。
在下文中一共展示了Color.ToWpf方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Create
public void Create(Color color)
{
Control =
new sd.SolidColorBrush(
renderTarget: null, // BUGBUG: TODO
color: color.ToWpf());
}
示例2: Create
public object Create (Color startColor, Color endColor, PointF startPoint, PointF endPoint)
{
return new swm.LinearGradientBrush (startColor.ToWpf (), endColor.ToWpf (), startPoint.ToWpf (), endPoint.ToWpf ()) {
MappingMode = swm.BrushMappingMode.Absolute,
SpreadMethod = swm.GradientSpreadMethod.Repeat
};
}
示例3: Create
public object Create (Color color, float thickness)
{
var brush = new swm.SolidColorBrush (color.ToWpf ());
var pen = new swm.Pen (brush, thickness);
pen.EndLineCap = pen.StartLineCap = pen.DashCap = swm.PenLineCap.Square;
pen.MiterLimit = 10f;
return pen;
}
示例4: Create
public object Create(Color startColor, Color endColor, PointF center, PointF gradientOrigin, SizeF radius)
{
return new swm.RadialGradientBrush(startColor.ToWpf(), endColor.ToWpf())
{
Center = center.ToWpf(),
GradientOrigin = gradientOrigin.ToWpf(),
RadiusX = radius.Width,
RadiusY = radius.Height,
MappingMode = swm.BrushMappingMode.Absolute,
SpreadMethod = swm.GradientSpreadMethod.Pad
};
}
示例5: Create
public object Create (Color color)
{
return new swm.SolidColorBrush (color.ToWpf ());
}
示例6: SetColor
public void SetColor (SolidBrush widget, Color color)
{
((swm.SolidColorBrush)widget.ControlObject).Color = color.ToWpf ();
}
示例7: SetColor
public void SetColor (Pen widget, Color color)
{
var brush = (swm.SolidColorBrush)((swm.Pen)widget.ControlObject).Brush;
brush.Color = color.ToWpf ();
}