1. Basic classes commonly used in graphics
Point: (x, y) The point determined by the coordinate.
Size: a small class that determines the height and width.
Rect: rectangle class, which can be determined by a point and a size.
Color: The color class determined by R, G, B, and.
Geometry and shape are classes that define space areas. shape has related brushes and can be displayed to the screen, but geometry does not.
Common shape attributes:
Fill: filled brush
Stroke: stroke, boundary color brush
Strokethickness: boundary thickness
Stretch: Fill stretch mode. None indicates to keep the original size, fill indicates to fill up and stretch, uniform indicates to maintain the proportion and adjust the size to fit the size, and uniformtofill indicates to keep the proportion and fill up.
Common shapes include line, rectangle, ellipse, polyline, polygon, and path.
2. path can draw any image.
The path. data attribute is of the geometry type. Simple geometry includes linegeometry, rectanglegeometry, and ellipsegeometry.
You can use geometrygroup to combine several ry shapes into more complex shapes.
You can use pathgeometry to create a path and use segment.
Another method to implement path is to use the path markup language, that is, the simple method of segment.
With the data attribute, You can inherit the path to implement custom images.
In addition, the expression blend tool allows you to easily create complex paths and import ps, Illustrator, and Flash files.
3. Paint Brush
Solidcolorbrush: A monochrome paint brush that supports color values in colors and hexadecimal color values.
Lineargradientbrush: linear gradient paint brush. It can be any combination of two or more colors.
Imagebrush: image painting brush. Fill is used to fill JPEG or PNG images.
4. Crop clip
For controls inherited from uielement, the clip attribute can be cropped out for display. The syntax is the same as the data attribute assignment Syntax of path.
When cropping an image, the clip attribute can only use rectanglegeometry.
Clip is the property of uielement, so all XAML controls can use it to crop images.
In this way, you can implement some functions, such as setting the child controls beyond the layout panel to be invisible.
Wp8.1 UI programming 4. Graphics