автор: Ульян 12.03.2018 Комментарии: 9
A Line ignores any value provided for Fill , because it has no interior space. The total Path consists of a Bezier curve segment and a line segment.
You can set the Data property to a single Geometry object. On the other hand, a Rectangle is probably a better choice for control composition.
Notice that the first and last points are not connected by the Stroke outline as they are in a Polygon. We set the RadiusX property to 50 and the RadiusY property to 10, which gives the Rectangle rounded corners. The Points property defines the collection of points that make up the boundary.
Path A Path is the most versatile Shape because you can use it to define an arbitrary geometry. The next example shows a usage of the other technique we discussed:
On the other hand, Path. Add line1 ; Polyline A Polyline is similar to a Polygon in that the boundary of the shape is defined by a set of points, except the last point in a Polyline is not connected to the first point.
Point 60, ; points. For example, a Point is part of the event data for touch events, so you can know exactly where in a coordinate space the touch action occurred.
Data value is consuming a serialization format for graphics. Path A Path is the most versatile Shape because you can use it to define an arbitrary geometry. This enables minimal markup for horizontal or vertical lines.
Shape classes and Geometry classes. Data serialization format and what the numbers represent. If your intention is to create a rectangle shape around other content, it might be better to use Border because it can have child content and will automatically size around that content, rather than using the fixed dimensions for height and width like Rectangle does.
In this form, the Path. A Border also has the option of having rounded corners if you set the CornerRadius property. The main difference between these classes is that a Shape has a brush associated with it and can be rendered to the screen, and a Geometry simply defines a region of space and is not rendered unless it helps contribute information to another UI property.