Microsoft.UI.Xaml.Media Namespace

Provides brushes, basic media support, and graphics primitives.

Note

This namespace requires the Microsoft.UI.Xaml.Controls NuGet package, a part of the Microsoft Windows UI Library.

Classes

AcrylicBrush

Paints an area with a semi-transparent material that uses multiple effects including blur and a noise texture.

ArcSegment

Represents an elliptical arc between two points.

BezierSegment

Represents a cubic Bezier curve drawn between two points.

BitmapCache

Represents the behavior of caching a visual element or tree of elements as bitmap surfaces.

Brush

Defines objects used to paint graphical objects. Classes that derive from Brush describe how the area is painted.

BrushCollection

Represents an ordered collection of Brush values.

CacheMode

Represents cached content modes for graphics acceleration features.

CompositeTransform

Applies multiple transform operations to an object.

CompositionTarget

Represents the composited display surface for an app. This class provides application-wide rendering events.

DoubleCollection

Represents an ordered collection of Double values.

EllipseGeometry

Represents the geometry of a circle or ellipse.

FontFamily

Represents a family of related fonts.

GeneralTransform

Provides generalized transformation support for objects. GeneralTransform is a base class that's in the hierarchy of practical transform classes such as TranslateTransform.

Geometry

Provides a base class for objects that define geometric shapes. Geometry objects can be used for clipping regions and as geometry definitions for rendering two-dimensional graphical data as a Path.

GeometryCollection

Represents a collection of Geometry objects.

GeometryGroup

Represents a composite geometry, composed of other Geometry objects.

GradientBrush

An abstract class that describes a gradient, composed of gradient stops.

GradientStop

Describes the location and color of a transition point in a gradient.

GradientStopCollection

Represents a collection of GradientStop objects that can be individually accessed by index.

ImageBrush

Paints an area with an image. The image source is typically obtained from file formats such as Joint Photographic Experts Group (JPEG).

ImageSource

Provides an object source type for the Image.Source and ImageBrush.ImageSource properties.

LinearGradientBrush

Paints an area with a linear gradient.

LineGeometry

Represents the geometry of a line.

LineSegment

Represents a line drawn between two points, which can be part of a PathFigure within Path data.

LoadedImageSourceLoadCompletedEventArgs

Provides event data for the LoadedImageSurface.LoadCompleted event.

LoadedImageSurface

Represents a composition surface that an image can be downloaded, decoded and loaded onto. You can load an image using a Uniform Resource Identifier (URI) that references an image source file, or supplying a IRandomAccessStream.

Matrix3DProjection

Applies a Matrix3D projection to an object.

MatrixHelper

Provides static helper methods for processing Matrix values. C# and Microsoft Visual Basic code should use members of Matrix instead.

MatrixTransform

Creates an arbitrary affine matrix transformation that is used to manipulate objects or coordinate systems in a two-dimensional plane.

PathFigure

Represents a subsection of a geometry, a single connected series of two-dimensional geometric segments.

PathFigureCollection

Represents a collection of PathFigure objects that collectively make up the geometry of a PathGeometry.

PathGeometry

Represents a complex vector-based shape that may be composed of arcs, curves, ellipses, lines, and rectangles.

PathSegment

Represents a segment of a PathFigure object. Derived classes of PathFigure describe different types of segments.

PathSegmentCollection

Represents a collection of PathSegment objects that can be individually accessed by index.

PlaneProjection

Represents a perspective transform (a 3-D-like effect) on an object.

PointCollection

Represents a collection of Point values that can be individually accessed by index.

PolyBezierSegment

Represents one or more cubic Bezier curves.

PolyLineSegment

Represents a set of line segments defined by a Point collection with each Point specifying the end point of a line segment.

PolyQuadraticBezierSegment

Represents a set of quadratic Bezier segments.

Projection

Provides a base class for projections, which describe how to transform an object in 3-D space using perspective transforms.

QuadraticBezierSegment

Creates a quadratic Bezier curve between two points in a PathFigure.

RadialGradientBrush

RadialGradientBrush paints an area with a radial gradient. A center point defines the origin of the gradient, and an ellipse defines the outer bounds of the gradient.

RectangleGeometry

Describes a two-dimensional rectangular geometry.

RenderedEventArgs

Provides event data for the Rendered event.

RenderingEventArgs

Provides event data for the Rendering event.

RevealBackgroundBrush

Important

RevealBackgroundBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Paints a control background with a reveal effect using composition brush and light effects.

RevealBorderBrush

Important

RevealBorderBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Paints a control border with a reveal effect using composition brush and light effects.

RevealBrush

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Base class for brushes that use composition effects and lighting to implement the reveal visual design treatment.

RotateTransform

Rotates an object around a specified point in a two-dimensional x-y coordinate system.

ScaleTransform

Scales an object in the two-dimensional x-y coordinate system.

Shadow

The base class for shadow effects that can be applied to a XAML element.

SkewTransform

Represents a two-dimensional skew.

SolidColorBrush

Paints an area with a solid color. The solid color is defined by a Color value.

ThemeShadow

A ThemeShadow is a preconfigured shadow effect that can be applied to any XAML element to draw shadows appropriately based on x, y, z coordinates. ThemeShadow also automatically adjusts for other environmental specifications:

  • Adapts to changes in lighting, user theme, app environment, and shell.
  • Shadows elements automatically based on their elevation.
  • Keeps elements in sync as they move and change elevation.
  • Keeps shadows consistent throughout and across applications.
TileBrush

Base class that describes a way to paint a region. Parent of ImageBrush.

Transform

Defines functionality that enables transformations in a two-dimensional plane.

TransformCollection

Represents a collection of Transform objects that can be individually accessed by index.

TransformGroup

Represents a composite Transform composed of other Transform objects.

TranslateTransform

Translates (moves) an object in the two-dimensional x-y coordinate system.

VisualTreeHelper

Provides utility methods that can be used to traverse object relationships (along child-object or parent-object axes) in the visual tree of your app.

XamlCompositionBrushBase

Provides a base class used to create XAML brushes that paint an area with a CompositionBrush.

XamlLight

Provides a base class used to create XAML lights that use a CompositionLight to apply lighting effects to XAML elements and brushes.

Structs

Matrix

Represents a 3 × 3 affine transformation matrix used for transformations in two-dimensional space.

Enums

AcrylicBackgroundSource

Defines values that specify whether the brush samples from the app content or from the content behind the app window.

AlignmentX

Describes how content is positioned horizontally in a container.

AlignmentY

Describes how content is positioned vertically in a container.

BrushMappingMode

Specifies the coordinate system used by a Brush.

ColorInterpolationMode

Determines how the colors in a gradient are interpolated.

ElementCompositeMode

Specifies values for the alternate composition and blending modes of elements in mixed XAML/Microsoft DirectX UI.

FillRule

Specifies how the intersecting areas of PathFigure objects contained in a Geometry are combined to form the area of the Geometry.

GradientSpreadMethod

Specifies how to draw the gradient outside a gradient brush's gradient vector or space.

LoadedImageSourceLoadStatus

Defines constants that specify whether an image loaded, or why it failed to load.

PenLineCap

Describes the shape at the end of a line or segment.

PenLineJoin

Describes the shape that joins two lines or segments.

RevealBrushState

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Defines constants that specify the pointer state of an element.

Stretch

Describes how content is resized to fill its allocated space.

StyleSimulations

Describes the simulation style of a font.

SweepDirection

Specifies the direction in which an elliptical arc is drawn.

Examples

See the XAML Controls Gallery sample app for examples of WinUI features and controls.

If you have the XAML Controls Gallery app installed, open the app to see the controls in action.

If you don't have the XAML Controls Gallery app installed, get the WinUI 2.x version from the Microsoft Store.

You can also view, clone, and build the XAML Controls Gallery source code from GitHub (switch to the WinUI 3 Preview branch for WinUI 3 Preview controls and features).