dotnet/maui

Add triggers to the shadow property

Open

#8,506 opened on Jul 3, 2022

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C# (1,951 forks)batch import
area-drawingarea-xamlgood first issueproposal/opent/enhancement ☀️

Repository metrics

Stars
 (23,245 stars)
PR merge metrics
 (Avg merge 47d 9h) (248 merged PRs in 30d)

Description

Description

Ability to add triggers to the shadow property.

Public API Changes

<Ellipse.Shadow>
    <Shadow Brush="Transparent"
            Opacity="0.5"
            Radius="70"
            Offset="0,0">
        <Shadow.Triggers>
            <DataTrigger Binding="{Binding IsSelected}"
                    TargetType="Ellipse"
                    Value="True">
                <Setter Property="Brush" Value="{DynamicResource BlueDarkColour}" />
            </DataTrigger>
        </Shadow.Triggers>
    </Shadow>
</Ellipse.Shadow>

image

Intended Use-Case

In my example, i want to add a shadow to selected elements

Contributor guide