本文整理汇总了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 ();
}