AttachedCardShadow Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A performant rectangular Windows.UI.Composition.DropShadow which can be attached to any Windows.UI.Xaml.FrameworkElement. It uses Win2D to create a clipped area of the outline of the element such that transparent elements don't see the shadow below them, and the shadow can be attached without having to project to another surface. It is animatable, can be shared via a resource, and used in a Windows.UI.Xaml.Style.
public sealed class AttachedCardShadow : Microsoft.Toolkit.Uwp.UI.AttachedShadowBase
type AttachedCardShadow = class
inherit AttachedShadowBase
Public NotInheritable Class AttachedCardShadow
Inherits AttachedShadowBase
- Inheritance
This shadow will not work on Windows.UI.Xaml.FrameworkElement which is directly clipping to its bounds (e.g. a Windows.UI.Xaml.Controls.Border using a Windows.UI.Xaml.Controls.Control.CornerRadius). An extra Windows.UI.Xaml.Controls.Border can instead be applied around the clipped border with the Shadow to create the desired effect. Most existing controls due to how they're templated will not encounter this behavior or require this workaround.
Corner |
The Windows.UI.Xaml.DependencyProperty for CornerRadius |
Blur |
Gets or sets the blur radius of the shadow. (Inherited from AttachedShadowBase) |
Color |
Gets or sets the color of the shadow. (Inherited from AttachedShadowBase) |
Corner |
Gets or sets the roundness of the shadow's corners. |
Is |
Gets a value indicating whether or not this AttachedShadowBase implementation is supported on the current platform. |
Offset |
Gets or sets the offset of the shadow as a string representation of a Vector3. (Inherited from AttachedShadowBase) |
Opacity |
Gets or sets the opacity of the shadow. (Inherited from AttachedShadowBase) |
Supports |
Gets a value indicating whether or not OnSizeChanged should be called when Windows.UI.Xaml.FrameworkElement.SizeChanged is fired. (Inherited from AttachedShadowBase) |
Enumerate |
Gets an enumeration over the current list of AttachedShadowElementContext of elements using this shared shadow definition. (Inherited from AttachedShadowBase) |
Get |
Get the associated AttachedShadowElementContext for the specified Windows.UI.Xaml.FrameworkElement. (Inherited from AttachedShadowBase) |
Get |
Get the Windows.UI.Composition.CompositionClip for the shadow's Windows.UI.Composition.SpriteVisual (Inherited from AttachedShadowBase) |
Get |
Get a Windows.UI.Composition.CompositionBrush in the shape of the element that is casting the shadow. (Inherited from AttachedShadowBase) |
On |
Override to handle when the AttachedShadowElementContext for an element is being initialized. (Inherited from AttachedShadowBase) |
On |
Override to handle when the AttachedShadowElementContext for an element is being uninitialized. (Inherited from AttachedShadowBase) |
On |
This method is called when a DependencyProperty is changed. (Inherited from AttachedShadowBase) |
On |
This method is called when the element size changes, and SupportsOnSizeChangedEvent = true. (Inherited from AttachedShadowBase) |
Set |
Sets SpriteVisual as a child visual on Element (Inherited from AttachedShadowBase) |
Update |
Update the clipping on the shadow's Windows.UI.Composition.SpriteVisual. (Inherited from AttachedShadowBase) |
Update |
Update the mask that gives the shadow its shape. (Inherited from AttachedShadowBase) |
Producto | Versiones |
---|---|
Windows Community Toolkit | 7.1.0 |