XamlControlsResources.EnsureRevealLights(UIElement) Method
Definition
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.
Important
EnsureRevealLights 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.
Ensures that ambient and border lights required for reveal effects are set on the specified element.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
public:
static void EnsureRevealLights(UIElement ^ element);
static void EnsureRevealLights(UIElement const& element);
public static void EnsureRevealLights(UIElement element);
Public Shared Sub EnsureRevealLights (element As UIElement)
Parameters
- element
- UIElement
The element that requires lighting for reveal effects.
Remarks
Typically, lights required for reveal effects are attached automatically but, in some cases, lights can be lost or might never be connected. Call this method to ensure they are connected.
This method can be called multiple times as lights will only be attached once.
Examples where this method might need calling include the following:
- Reveal on full window media controls (pass the MediaTransportControls instance).
- App sets Window.Content, which destroys the RootScrolLViewer lights (pass any element in the main tree).