Pulkit Mehta
Pulkit Mehta

Reputation: 117

Change colour of overlay area when using Flyout in UWP app

I am using a FlyoutBase in my UWP app. I have set the LightDismissOverlayMode Property to "On". This makes the area outside of the light-dismiss UI to be darkened. Is there any way by which I can choose the colour of the area being darkened?

Upvotes: 0

Views: 253

Answers (1)

Nico Zhu
Nico Zhu

Reputation: 32775

Is there any way by which I can choose the colour of the area being darkened?

There is FlyoutLightDismissOverlayBackground StaticResource in generic.xaml file, and you could modify it's ResourceKey for changing color in Application.Resources like the following.

<Application.Resources>
    <ResourceDictionary>
        <StaticResource x:Key="FlyoutLightDismissOverlayBackground" ResourceKey="SystemControlAcrylicElementMediumHighBrush" />
    </ResourceDictionary>
</Application.Resources>

Upvotes: 1

Related Questions