Shape Shape Shape Class

Definition

Provides a base class for shape elements, such as Ellipse, Polygon, and Rectangle.

public : class Shape : FrameworkElement, IShape, IShape2
public class Shape : FrameworkElement, IShape, IShape2
Public Class Shape Inherits FrameworkElement Implements IShape, IShape2
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

For example code of how to use Shape derived classes such as Rectangle and Path, see XAML vector-based drawing sample.

Remarks

Shape defines several properties that are shared by all the Shape derived classes. The most commonly used properties are Fill, Stroke, and StrokeThickness. Stroke uses a Brush to draw the outline of the shape, and Fill uses a Brush to draw the interior. For more info on how to use the Shape derived classes in XAML UI, see Draw shapes.

Shape also derives from FrameworkElement and inherits various properties from that class. Those properties include Height and Width. For most other FrameworkElement derived types, setting Height and Width is the primary way to specify that element's dimensions in UI (although you often would leave them as "Auto" to take advantage of adaptive layout). But not all of the Shape classes use Height or Width to specify their dimensions, and instead use specific properties that might define a set of points. In this case a Height or Width is calculated for layout, but you shouldn't attempt to set the Height or Width. See the remarks or descriptions in specific Shape derived classes for more info.

Because the Shape derived classes are UI elements they can be used as content for containers such as controls and panels. They have practical presence in the UI; for example they are hit-testable with input events, they report desired size for layout, and so on. There are other graphics definition classes for XAML that aren't UI elements. These mostly exist in the Windows.UI.Xaml.Media namespace. Examples of such graphics classes are the Geometry types, PathFigure types and PathSegment types.

Shape derived classes

Shape is the parent class for several immediately derived classes that define primitive shapes for use as UI elements:

Constructors

Shape() Shape() Shape()

Provides base class initialization behavior for Shape derived classes.

protected : Shape()
protected Shape()
Protected Sub New()

Properties

AccessKey AccessKey AccessKey

Inherited from UIElement

AccessKeyProperty AccessKeyProperty AccessKeyProperty

Inherited from UIElement

AccessKeyScopeOwner AccessKeyScopeOwner AccessKeyScopeOwner

Inherited from UIElement

AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty

Inherited from UIElement

ActualHeight ActualHeight ActualHeight

Inherited from FrameworkElement

ActualHeightProperty ActualHeightProperty ActualHeightProperty

Inherited from FrameworkElement

ActualTheme ActualTheme ActualTheme

Inherited from FrameworkElement

ActualThemeProperty ActualThemeProperty ActualThemeProperty

Inherited from FrameworkElement

ActualWidth ActualWidth ActualWidth

Inherited from FrameworkElement

ActualWidthProperty ActualWidthProperty ActualWidthProperty

Inherited from FrameworkElement

AllowDrop AllowDrop AllowDrop

Inherited from UIElement

AllowDropProperty AllowDropProperty AllowDropProperty

Inherited from UIElement

AllowFocusOnInteraction AllowFocusOnInteraction AllowFocusOnInteraction

Inherited from FrameworkElement

AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty

Inherited from FrameworkElement

AllowFocusWhenDisabled AllowFocusWhenDisabled AllowFocusWhenDisabled

Inherited from FrameworkElement

AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty

Inherited from FrameworkElement

BaseUri BaseUri BaseUri

Inherited from FrameworkElement

CacheMode CacheMode CacheMode

Inherited from UIElement

CacheModeProperty CacheModeProperty CacheModeProperty

Inherited from UIElement

CanDrag CanDrag CanDrag

Inherited from UIElement

CanDragProperty CanDragProperty CanDragProperty

Inherited from UIElement

CharacterReceivedEvent CharacterReceivedEvent CharacterReceivedEvent

Inherited from UIElement

Clip Clip Clip

Inherited from UIElement

ClipProperty ClipProperty ClipProperty

Inherited from UIElement

CompositeMode CompositeMode CompositeMode

Inherited from UIElement

CompositeModeProperty CompositeModeProperty CompositeModeProperty

Inherited from UIElement

ContextFlyout ContextFlyout ContextFlyout

Inherited from UIElement

ContextFlyoutProperty ContextFlyoutProperty ContextFlyoutProperty

Inherited from UIElement

DataContext DataContext DataContext

Inherited from FrameworkElement

DataContextProperty DataContextProperty DataContextProperty

Inherited from FrameworkElement

DesiredSize DesiredSize DesiredSize

Inherited from UIElement

Dispatcher Dispatcher Dispatcher

Inherited from DependencyObject

DoubleTappedEvent DoubleTappedEvent DoubleTappedEvent

Inherited from UIElement

DragEnterEvent DragEnterEvent DragEnterEvent

Inherited from UIElement

DragLeaveEvent DragLeaveEvent DragLeaveEvent

Inherited from UIElement

DragOverEvent DragOverEvent DragOverEvent

Inherited from UIElement

DropEvent DropEvent DropEvent

Inherited from UIElement

ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked

Inherited from UIElement

ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty

Inherited from UIElement

Fill Fill Fill

Gets or sets the Brush that paints the interior area of the shape.

public : Brush Fill { get; set; }
public Brush Fill { get; set; }
Public ReadWrite Property Fill As Brush
<shape Fill="{StaticResource resourceName}"/>

Value
Brush Brush Brush

A Brush that paints/fills the shape interior. The default is null, (a null brush) which is evaluated as Transparent for rendering.

See Also

FillProperty FillProperty FillProperty

Identifies the Fill dependency property.

public : static DependencyProperty FillProperty { get; }
public static DependencyProperty FillProperty { get; }
Public Static ReadOnly Property FillProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Fill dependency property.

FlowDirection FlowDirection FlowDirection

Inherited from FrameworkElement

FlowDirectionProperty FlowDirectionProperty FlowDirectionProperty

Inherited from FrameworkElement

FocusVisualMargin FocusVisualMargin FocusVisualMargin

Inherited from FrameworkElement

FocusVisualMarginProperty FocusVisualMarginProperty FocusVisualMarginProperty

Inherited from FrameworkElement

FocusVisualPrimaryBrush FocusVisualPrimaryBrush FocusVisualPrimaryBrush

Inherited from FrameworkElement

FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty

Inherited from FrameworkElement

FocusVisualPrimaryThickness FocusVisualPrimaryThickness FocusVisualPrimaryThickness

Inherited from FrameworkElement

FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty

Inherited from FrameworkElement

FocusVisualSecondaryBrush FocusVisualSecondaryBrush FocusVisualSecondaryBrush

Inherited from FrameworkElement

FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty

Inherited from FrameworkElement

FocusVisualSecondaryThickness FocusVisualSecondaryThickness FocusVisualSecondaryThickness

Inherited from FrameworkElement

FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty

Inherited from FrameworkElement

GeometryTransform GeometryTransform GeometryTransform

Gets a value that represents a Transform that is applied to the geometry of a Shape before it is drawn.

public : Transform GeometryTransform { get; }
public Transform GeometryTransform { get; }
Public ReadOnly Property GeometryTransform As Transform
<object>
  <object.GeometryTransform>
    singleTransform
  </object.GeometryTransform>
</object>
Value
Transform Transform Transform

A Transform that is applied to the geometry of a Shape before it is drawn.

GettingFocusEvent GettingFocusEvent GettingFocusEvent

Inherited from UIElement

Height Height Height

Inherited from FrameworkElement

HeightProperty HeightProperty HeightProperty

Inherited from FrameworkElement

HighContrastAdjustment HighContrastAdjustment HighContrastAdjustment

Inherited from UIElement

HighContrastAdjustmentProperty HighContrastAdjustmentProperty HighContrastAdjustmentProperty

Inherited from UIElement

HoldingEvent HoldingEvent HoldingEvent

Inherited from UIElement

HorizontalAlignment HorizontalAlignment HorizontalAlignment

Inherited from FrameworkElement

HorizontalAlignmentProperty HorizontalAlignmentProperty HorizontalAlignmentProperty

Inherited from FrameworkElement

IsAccessKeyScope IsAccessKeyScope IsAccessKeyScope

Inherited from UIElement

IsAccessKeyScopeProperty IsAccessKeyScopeProperty IsAccessKeyScopeProperty

Inherited from UIElement

IsDoubleTapEnabled IsDoubleTapEnabled IsDoubleTapEnabled

Inherited from UIElement

IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty

Inherited from UIElement

IsHitTestVisible IsHitTestVisible IsHitTestVisible

Inherited from UIElement

IsHitTestVisibleProperty IsHitTestVisibleProperty IsHitTestVisibleProperty

Inherited from UIElement

IsHoldingEnabled IsHoldingEnabled IsHoldingEnabled

Inherited from UIElement

IsHoldingEnabledProperty IsHoldingEnabledProperty IsHoldingEnabledProperty

Inherited from UIElement

IsRightTapEnabled IsRightTapEnabled IsRightTapEnabled

Inherited from UIElement

IsRightTapEnabledProperty IsRightTapEnabledProperty IsRightTapEnabledProperty

Inherited from UIElement

IsTapEnabled IsTapEnabled IsTapEnabled

Inherited from UIElement

IsTapEnabledProperty IsTapEnabledProperty IsTapEnabledProperty

Inherited from UIElement

KeyDownEvent KeyDownEvent KeyDownEvent

Inherited from UIElement

KeyTipHorizontalOffset KeyTipHorizontalOffset KeyTipHorizontalOffset

Inherited from UIElement

KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty

Inherited from UIElement

KeyTipPlacementMode KeyTipPlacementMode KeyTipPlacementMode

Inherited from UIElement

KeyTipPlacementModeProperty KeyTipPlacementModeProperty KeyTipPlacementModeProperty

Inherited from UIElement

KeyTipVerticalOffset KeyTipVerticalOffset KeyTipVerticalOffset

Inherited from UIElement

KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty

Inherited from UIElement

KeyUpEvent KeyUpEvent KeyUpEvent

Inherited from UIElement

KeyboardAccelerators KeyboardAccelerators KeyboardAccelerators

Inherited from UIElement

Language Language Language

Inherited from FrameworkElement

LanguageProperty LanguageProperty LanguageProperty

Inherited from FrameworkElement

Lights Lights Lights

Inherited from UIElement

LightsProperty LightsProperty LightsProperty

Inherited from UIElement

LosingFocusEvent LosingFocusEvent LosingFocusEvent

Inherited from UIElement

ManipulationCompletedEvent ManipulationCompletedEvent ManipulationCompletedEvent

Inherited from UIElement

ManipulationDeltaEvent ManipulationDeltaEvent ManipulationDeltaEvent

Inherited from UIElement

ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent

Inherited from UIElement

ManipulationMode ManipulationMode ManipulationMode

Inherited from UIElement

ManipulationModeProperty ManipulationModeProperty ManipulationModeProperty

Inherited from UIElement

ManipulationStartedEvent ManipulationStartedEvent ManipulationStartedEvent

Inherited from UIElement

ManipulationStartingEvent ManipulationStartingEvent ManipulationStartingEvent

Inherited from UIElement

Margin Margin Margin

Inherited from FrameworkElement

MarginProperty MarginProperty MarginProperty

Inherited from FrameworkElement

MaxHeight MaxHeight MaxHeight

Inherited from FrameworkElement

MaxHeightProperty MaxHeightProperty MaxHeightProperty

Inherited from FrameworkElement

MaxWidth MaxWidth MaxWidth

Inherited from FrameworkElement

MaxWidthProperty MaxWidthProperty MaxWidthProperty

Inherited from FrameworkElement

MinHeight MinHeight MinHeight

Inherited from FrameworkElement

MinHeightProperty MinHeightProperty MinHeightProperty

Inherited from FrameworkElement

MinWidth MinWidth MinWidth

Inherited from FrameworkElement

MinWidthProperty MinWidthProperty MinWidthProperty

Inherited from FrameworkElement

Name Name Name

Inherited from FrameworkElement

NameProperty NameProperty NameProperty

Inherited from FrameworkElement

NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent

Inherited from UIElement

Opacity Opacity Opacity

Inherited from UIElement

OpacityProperty OpacityProperty OpacityProperty

Inherited from UIElement

Parent Parent Parent

Inherited from FrameworkElement

PointerCanceledEvent PointerCanceledEvent PointerCanceledEvent

Inherited from UIElement

PointerCaptureLostEvent PointerCaptureLostEvent PointerCaptureLostEvent

Inherited from UIElement

PointerCaptures PointerCaptures PointerCaptures

Inherited from UIElement

PointerCapturesProperty PointerCapturesProperty PointerCapturesProperty

Inherited from UIElement

PointerEnteredEvent PointerEnteredEvent PointerEnteredEvent

Inherited from UIElement

PointerExitedEvent PointerExitedEvent PointerExitedEvent

Inherited from UIElement

PointerMovedEvent PointerMovedEvent PointerMovedEvent

Inherited from UIElement

PointerPressedEvent PointerPressedEvent PointerPressedEvent

Inherited from UIElement

PointerReleasedEvent PointerReleasedEvent PointerReleasedEvent

Inherited from UIElement

PointerWheelChangedEvent PointerWheelChangedEvent PointerWheelChangedEvent

Inherited from UIElement

PreviewKeyDownEvent PreviewKeyDownEvent PreviewKeyDownEvent

Inherited from UIElement

PreviewKeyUpEvent PreviewKeyUpEvent PreviewKeyUpEvent

Inherited from UIElement

Projection Projection Projection

Inherited from UIElement

ProjectionProperty ProjectionProperty ProjectionProperty

Inherited from UIElement

RenderSize RenderSize RenderSize

Inherited from UIElement

RenderTransform RenderTransform RenderTransform

Inherited from UIElement

RenderTransformOrigin RenderTransformOrigin RenderTransformOrigin

Inherited from UIElement

RenderTransformOriginProperty RenderTransformOriginProperty RenderTransformOriginProperty

Inherited from UIElement

RenderTransformProperty RenderTransformProperty RenderTransformProperty

Inherited from UIElement

RequestedTheme RequestedTheme RequestedTheme

Inherited from FrameworkElement

RequestedThemeProperty RequestedThemeProperty RequestedThemeProperty

Inherited from FrameworkElement

Resources Resources Resources

Inherited from FrameworkElement

RightTappedEvent RightTappedEvent RightTappedEvent

Inherited from UIElement

Stretch Stretch Stretch

Gets or sets a Stretch enumeration value that describes how the shape fills its allocated space.

public : Stretch Stretch { get; set; }
public Stretch Stretch { get; set; }
Public ReadWrite Property Stretch As Stretch
<object Stretch="stretchvalueName"/>
Value
Stretch Stretch Stretch

One of the Stretch enumeration values. The default value at run time depends on the type of Shape.

StretchProperty StretchProperty StretchProperty

Identifies the Stretch dependency property.

public : static DependencyProperty StretchProperty { get; }
public static DependencyProperty StretchProperty { get; }
Public Static ReadOnly Property StretchProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Stretch dependency property.

Stroke Stroke Stroke

Gets or sets the Brush that specifies how the Shape outline is painted.

public : Brush Stroke { get; set; }
public Brush Stroke { get; set; }
Public ReadWrite Property Stroke As Brush
<shape Stroke="{StaticResource resourceName}"/>

Value
Brush Brush Brush

A Brush that specifies how the Shape outline is painted. The default is null.

See Also

StrokeDashArray StrokeDashArray StrokeDashArray

Gets or sets a collection of Double values that indicates the pattern of dashes and gaps that is used to outline shapes.

public : DoubleCollection StrokeDashArray { get; set; }
public DoubleCollection StrokeDashArray { get; set; }
Public ReadWrite Property StrokeDashArray As DoubleCollection
<object StrokeDashArray="strokeDashString"/>
Value
DoubleCollection DoubleCollection DoubleCollection

A collection of Double values that specifies the pattern of dashes and gaps.

StrokeDashArrayProperty StrokeDashArrayProperty StrokeDashArrayProperty

Identifies the StrokeDashArray dependency property.

public : static DependencyProperty StrokeDashArrayProperty { get; }
public static DependencyProperty StrokeDashArrayProperty { get; }
Public Static ReadOnly Property StrokeDashArrayProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeDashArray dependency property.

StrokeDashCap StrokeDashCap StrokeDashCap

Gets or sets a PenLineCap enumeration value that specifies how the ends of a dash are drawn.

public : PenLineCap StrokeDashCap { get; set; }
public PenLineCap StrokeDashCap { get; set; }
Public ReadWrite Property StrokeDashCap As PenLineCap
<shape StrokeDashCap="penLineCapMemberName"/>
Value
PenLineCap PenLineCap PenLineCap

One of the enumeration values for PenLineCap. The default is Flat.

StrokeDashCapProperty StrokeDashCapProperty StrokeDashCapProperty

Identifies the StrokeDashCap dependency property.

public : static DependencyProperty StrokeDashCapProperty { get; }
public static DependencyProperty StrokeDashCapProperty { get; }
Public Static ReadOnly Property StrokeDashCapProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeDashCap dependency property.

StrokeDashOffset StrokeDashOffset StrokeDashOffset

Gets or sets a value that specifies the distance within the dash pattern where a dash begins.

public : double StrokeDashOffset { get; set; }
public double StrokeDashOffset { get; set; }
Public ReadWrite Property StrokeDashOffset As double
<object StrokeDashOffset="double"/>
Value
double double double

A value that represents the distance within the dash pattern where a dash begins. The default value is 0.

StrokeDashOffsetProperty StrokeDashOffsetProperty StrokeDashOffsetProperty

Identifies the StrokeDashOffset dependency property.

public : static DependencyProperty StrokeDashOffsetProperty { get; }
public static DependencyProperty StrokeDashOffsetProperty { get; }
Public Static ReadOnly Property StrokeDashOffsetProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeDashOffset dependency property.

StrokeEndLineCap StrokeEndLineCap StrokeEndLineCap

Gets or sets a PenLineCap enumeration value that describes the Shape at the end of a line.

public : PenLineCap StrokeEndLineCap { get; set; }
public PenLineCap StrokeEndLineCap { get; set; }
Public ReadWrite Property StrokeEndLineCap As PenLineCap
<shape StrokeEndLineCap="penLineCapMemberName"/>
Value
PenLineCap PenLineCap PenLineCap

One of the enumeration values for PenLineCap. The default is Flat.

StrokeEndLineCapProperty StrokeEndLineCapProperty StrokeEndLineCapProperty

Identifies the StrokeEndLineCap dependency property.

public : static DependencyProperty StrokeEndLineCapProperty { get; }
public static DependencyProperty StrokeEndLineCapProperty { get; }
Public Static ReadOnly Property StrokeEndLineCapProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeEndLineCap dependency property.

StrokeLineJoin StrokeLineJoin StrokeLineJoin

Gets or sets a PenLineJoin enumeration value that specifies the type of join that is used at the vertices of a Shape.

public : PenLineJoin StrokeLineJoin { get; set; }
public PenLineJoin StrokeLineJoin { get; set; }
Public ReadWrite Property StrokeLineJoin As PenLineJoin
<shape StrokeLineJoin="penLineJoinMemberName"/>
Value
PenLineJoin PenLineJoin PenLineJoin

A value of the PenLineJoin enumeration that specifies the join appearance. The default value is Miter.

StrokeLineJoinProperty StrokeLineJoinProperty StrokeLineJoinProperty

Identifies the StrokeLineJoin dependency property.

public : static DependencyProperty StrokeLineJoinProperty { get; }
public static DependencyProperty StrokeLineJoinProperty { get; }
Public Static ReadOnly Property StrokeLineJoinProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeLineJoin dependency property.

StrokeMiterLimit StrokeMiterLimit StrokeMiterLimit

Gets or sets a limit on the ratio of the miter length to half the StrokeThickness of a Shape element.

public : double StrokeMiterLimit { get; set; }
public double StrokeMiterLimit { get; set; }
Public ReadWrite Property StrokeMiterLimit As double
<object StrokeMiterLimit="double"/>
Value
double double double

The limit on the ratio of the miter length to the StrokeThickness of a Shape element. This value is always a positive number that is greater than or equal to 1.

StrokeMiterLimitProperty StrokeMiterLimitProperty StrokeMiterLimitProperty

Identifies the StrokeMiterLimit dependency property.

public : static DependencyProperty StrokeMiterLimitProperty { get; }
public static DependencyProperty StrokeMiterLimitProperty { get; }
Public Static ReadOnly Property StrokeMiterLimitProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeMiterLimit dependency property.

StrokeProperty StrokeProperty StrokeProperty

Identifies the Stroke dependency property.

public : static DependencyProperty StrokeProperty { get; }
public static DependencyProperty StrokeProperty { get; }
Public Static ReadOnly Property StrokeProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Stroke dependency property.

StrokeStartLineCap StrokeStartLineCap StrokeStartLineCap

Gets or sets a PenLineCap enumeration value that describes the Shape at the start of a Stroke.

public : PenLineCap StrokeStartLineCap { get; set; }
public PenLineCap StrokeStartLineCap { get; set; }
Public ReadWrite Property StrokeStartLineCap As PenLineCap
<shape StrokeStartLineCap="penLineCapMemberName"/>
Value
PenLineCap PenLineCap PenLineCap

A value of the PenLineCap enumeration that specifies the shape at the start of a Stroke. The default is Flat.

StrokeStartLineCapProperty StrokeStartLineCapProperty StrokeStartLineCapProperty

Identifies the StrokeStartLineCap dependency property.

public : static DependencyProperty StrokeStartLineCapProperty { get; }
public static DependencyProperty StrokeStartLineCapProperty { get; }
Public Static ReadOnly Property StrokeStartLineCapProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeStartLineCap dependency property.

StrokeThickness StrokeThickness StrokeThickness

Gets or sets the width of the Shape stroke outline.

public : double StrokeThickness { get; set; }
public double StrokeThickness { get; set; }
Public ReadWrite Property StrokeThickness As double
<object StrokeThickness="double"/>
Value
double double double

The width of the Shape outline, in pixels. The default value is 0.

StrokeThicknessProperty StrokeThicknessProperty StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

public : static DependencyProperty StrokeThicknessProperty { get; }
public static DependencyProperty StrokeThicknessProperty { get; }
Public Static ReadOnly Property StrokeThicknessProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the StrokeThickness dependency property.

Style Style Style

Inherited from FrameworkElement

StyleProperty StyleProperty StyleProperty

Inherited from FrameworkElement

TabFocusNavigation TabFocusNavigation TabFocusNavigation

Inherited from UIElement

TabFocusNavigationProperty TabFocusNavigationProperty TabFocusNavigationProperty

Inherited from UIElement

Tag Tag Tag

Inherited from FrameworkElement

TagProperty TagProperty TagProperty

Inherited from FrameworkElement

TappedEvent TappedEvent TappedEvent

Inherited from UIElement

Transform3D Transform3D Transform3D

Inherited from UIElement

Transform3DProperty Transform3DProperty Transform3DProperty

Inherited from UIElement

Transitions Transitions Transitions

Inherited from UIElement

TransitionsProperty TransitionsProperty TransitionsProperty

Inherited from UIElement

Triggers Triggers Triggers

Inherited from FrameworkElement

UseLayoutRounding UseLayoutRounding UseLayoutRounding

Inherited from UIElement

UseLayoutRoundingProperty UseLayoutRoundingProperty UseLayoutRoundingProperty

Inherited from UIElement

VerticalAlignment VerticalAlignment VerticalAlignment

Inherited from FrameworkElement

VerticalAlignmentProperty VerticalAlignmentProperty VerticalAlignmentProperty

Inherited from FrameworkElement

Visibility Visibility Visibility

Inherited from UIElement

VisibilityProperty VisibilityProperty VisibilityProperty

Inherited from UIElement

Width Width Width

Inherited from FrameworkElement

WidthProperty WidthProperty WidthProperty

Inherited from FrameworkElement

XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy

Inherited from UIElement

XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty

Inherited from UIElement

XYFocusKeyboardNavigation XYFocusKeyboardNavigation XYFocusKeyboardNavigation

Inherited from UIElement

XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty

Inherited from UIElement

XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy

Inherited from UIElement

XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty

Inherited from UIElement

XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy

Inherited from UIElement

XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty

Inherited from UIElement

XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy

Inherited from UIElement

XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty

Inherited from UIElement

Methods

AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean)

Inherited from UIElement

Arrange(Rect) Arrange(Rect) Arrange(Rect)

Inherited from UIElement

ArrangeOverride(Size) ArrangeOverride(Size) ArrangeOverride(Size)

Inherited from FrameworkElement

CancelDirectManipulations CancelDirectManipulations CancelDirectManipulations

Inherited from UIElement

CapturePointer(Pointer) CapturePointer(Pointer) CapturePointer(Pointer)

Inherited from UIElement

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Inherited from DependencyObject

DeferTree(DependencyObject) DeferTree(DependencyObject) DeferTree(DependencyObject)

Inherited from FrameworkElement

FindName(String) FindName(String) FindName(String)

Inherited from FrameworkElement

FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect)

Inherited from UIElement

GetAlphaMask() GetAlphaMask() GetAlphaMask()

Returns a mask that represents the alpha channel of a XAML shape as a CompositionBrush.

public : CompositionBrush GetAlphaMask()
public CompositionBrush GetAlphaMask()
Public Function GetAlphaMask() As CompositionBrush
Returns

A mask that represents the alpha channel of a XAML shape.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

This method gets an alpha mask from a XAML shape as a CompositionBrush that you can use as an input to composition shadows and effects. The alpha mask CompositionBrush has the same alignment and stretch property values that the source XAML shape applies to its rendered content so that you can use those values to correctly position shadows or effects relative to the XAML element.

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Inherited from DependencyObject

GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty)

Inherited from FrameworkElement

GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder

Inherited from UIElement

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Inherited from DependencyObject

GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean)

Inherited from FrameworkElement

InvalidateArrange InvalidateArrange InvalidateArrange

Inherited from UIElement

InvalidateMeasure InvalidateMeasure InvalidateMeasure

Inherited from UIElement

Measure(Size) Measure(Size) Measure(Size)

Inherited from UIElement

MeasureOverride(Size) MeasureOverride(Size) MeasureOverride(Size)

Inherited from FrameworkElement

OnApplyTemplate OnApplyTemplate OnApplyTemplate

Inherited from FrameworkElement

OnCreateAutomationPeer OnCreateAutomationPeer OnCreateAutomationPeer

Inherited from UIElement

OnDisconnectVisualChildren OnDisconnectVisualChildren OnDisconnectVisualChildren

Inherited from UIElement

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Inherited from DependencyObject

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Inherited from DependencyObject

ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer)

Inherited from UIElement

ReleasePointerCaptures ReleasePointerCaptures ReleasePointerCaptures

Inherited from UIElement

RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object)

Inherited from UIElement

SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase)

Inherited from FrameworkElement

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Inherited from DependencyObject

StartBringIntoView StartBringIntoView StartBringIntoView

Inherited from UIElement

StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions)

Inherited from UIElement

StartDragAsync(PointerPoint) StartDragAsync(PointerPoint) StartDragAsync(PointerPoint)

Inherited from UIElement

TransformToVisual(UIElement) TransformToVisual(UIElement) TransformToVisual(UIElement)

Inherited from UIElement

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer)

Inherited from UIElement

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Inherited from DependencyObject

UpdateLayout UpdateLayout UpdateLayout

Inherited from UIElement

Events

AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed

Inherited from UIElement

AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested

Inherited from UIElement

AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked

Inherited from UIElement

ActualThemeChanged ActualThemeChanged ActualThemeChanged

Inherited from FrameworkElement

CharacterReceived CharacterReceived CharacterReceived

Inherited from UIElement

ContextCanceled ContextCanceled ContextCanceled

Inherited from UIElement

ContextRequested ContextRequested ContextRequested

Inherited from UIElement

DataContextChanged DataContextChanged DataContextChanged

Inherited from FrameworkElement

DoubleTapped DoubleTapped DoubleTapped

Inherited from UIElement

DragEnter DragEnter DragEnter

Inherited from UIElement

DragLeave DragLeave DragLeave

Inherited from UIElement

DragOver DragOver DragOver

Inherited from UIElement

DragStarting DragStarting DragStarting

Inherited from UIElement

Drop Drop Drop

Inherited from UIElement

DropCompleted DropCompleted DropCompleted

Inherited from UIElement

GettingFocus GettingFocus GettingFocus

Inherited from UIElement

GotFocus GotFocus GotFocus

Inherited from UIElement

Holding Holding Holding

Inherited from UIElement

KeyDown KeyDown KeyDown

Inherited from UIElement

KeyUp KeyUp KeyUp

Inherited from UIElement

LayoutUpdated LayoutUpdated LayoutUpdated

Inherited from FrameworkElement

Loaded Loaded Loaded

Inherited from FrameworkElement

Loading Loading Loading

Inherited from FrameworkElement

LosingFocus LosingFocus LosingFocus

Inherited from UIElement

LostFocus LostFocus LostFocus

Inherited from UIElement

ManipulationCompleted ManipulationCompleted ManipulationCompleted

Inherited from UIElement

ManipulationDelta ManipulationDelta ManipulationDelta

Inherited from UIElement

ManipulationInertiaStarting ManipulationInertiaStarting ManipulationInertiaStarting

Inherited from UIElement

ManipulationStarted ManipulationStarted ManipulationStarted

Inherited from UIElement

ManipulationStarting ManipulationStarting ManipulationStarting

Inherited from UIElement

NoFocusCandidateFound NoFocusCandidateFound NoFocusCandidateFound

Inherited from UIElement

PointerCanceled PointerCanceled PointerCanceled

Inherited from UIElement

PointerCaptureLost PointerCaptureLost PointerCaptureLost

Inherited from UIElement

PointerEntered PointerEntered PointerEntered

Inherited from UIElement

PointerExited PointerExited PointerExited

Inherited from UIElement

PointerMoved PointerMoved PointerMoved

Inherited from UIElement

PointerPressed PointerPressed PointerPressed

Inherited from UIElement

PointerReleased PointerReleased PointerReleased

Inherited from UIElement

PointerWheelChanged PointerWheelChanged PointerWheelChanged

Inherited from UIElement

PreviewKeyDown PreviewKeyDown PreviewKeyDown

Inherited from UIElement

PreviewKeyUp PreviewKeyUp PreviewKeyUp

Inherited from UIElement

ProcessKeyboardAccelerators ProcessKeyboardAccelerators ProcessKeyboardAccelerators

Inherited from UIElement

RightTapped RightTapped RightTapped

Inherited from UIElement

SizeChanged SizeChanged SizeChanged

Inherited from FrameworkElement

Tapped Tapped Tapped

Inherited from UIElement

Unloaded Unloaded Unloaded

Inherited from FrameworkElement

See Also