UWP / WinRT从多个rects生成路径

时间:2015-12-23 21:17:44

标签: c# xaml geometry winrt-xaml uwp

如何从两个或多个矩形创建自定义路径? 我正在使用xaml / UWP,填充颜色必须透明。

现状; SimpleAdapter Android docs

需要的国家; setViewText(TextView, String)

目前我正在使用以下代码:

GeometryGroup path = new GeometryGroup();
path.Children.Add(new RectangleGeometry() { Rect = new Rect(0, 0, 100, 100) });
path.Children.Add(new RectangleGeometry() { Rect = new Rect(30, 30, 150, 100) });
Data = path;


<Path HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10"
Data="{Binding Data}"
Stroke="Blue" StrokeThickness="5" Opacity="1" />

0 个答案:

没有答案