You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
We deprecated our Light behavior; however, we pointed to a composition API which isn't as easy to use and requires some setup with code-behind.
Describe the solution
It'd be great to have another XAML helper in line with our other composition API XAML helpers for this scenario. Similar to what we want to do with ThemeShadows in #3122 as well.
I'd imagine being able to do the entire process from the composition example in XAML like so:
Option 1 - Organize Light with what it shines on together - (Mimic ThemeShadow API proposal #3122):
<StackPanelWidth="100">
<StackPanel.Lights>
<media:SpotLightx:Name="OrangeSpotLight"InnerConeColor="Orange"OuterConeColor="Yellow"InnerConeAngle="30"OuterConeAngle="45">
<media:SpotLight.CastTo>
<ex:SurfaceTarget="{x:Bind SpotLightBrush}"/>
<ex:SurfaceTarget="{x:Bind SpotLightUIElement}"/>
</media:SpotLight.CastTo>
</media:SpotLight>
</StackPanel.Lights>
<!-- This border is lit by the OrangeSpotLight, but its content is not. -->
<BorderBorderThickness="4"Margin="2">
<Border.BorderBrush>
<SolidColorBrushx:Name="SpotLightBrush"Color="White"/>
</Border.BorderBrush>
<RectangleFill="LightGray"Height="20"/>
</Border>
<!-- This border and its content are lit by the OrangeSpotLight. -->
<Borderx:Name="SpotLightUIElement"BorderThickness="4"BorderBrush="PaleGreen"Margin="2">
<RectangleFill="LightGray"Height="20"/>
</Border>
<!-- This border and its content are not lit by the OrangeSpotLight. -->
<BorderBorderThickness="4"BorderBrush="PaleGreen"Margin="2">
<RectangleFill="LightGray"Height="20"/>
</Border>
</StackPanel>
Option 2 - Tie to element being lit:
<StackPanelWidth="100">
<StackPanel.Lights>
<media:SpotLightx:Name="OrangeSpotLight"InnerConeColor="Orange"OuterConeColor="Yellow"InnerConeAngle="30"OuterConeAngle="45"/>
</StackPanel.Lights>
<!-- This border is lit by the OrangeSpotLight, but its content is not. -->
<BorderBorderThickness="4"Margin="2">
<Border.BorderBrush>
<SolidColorBrushx:Name="SpotLightBrush"Color="White"
media:SpotLight.Source="{x:Bind OrangeSpotLight}"/>
</Border.BorderBrush>
<RectangleFill="LightGray"Height="20"/>
</Border>
<!-- This border and its content are lit by the OrangeSpotLight. -->
<Borderx:Name="SpotLightUIElement"BorderThickness="4"BorderBrush="PaleGreen"Margin="2"
media:SpotLight.Source="{x:Bind OrangeSpotLight}">
<RectangleFill="LightGray"Height="20"/>
</Border>
<!-- This border and its content are not lit by the OrangeSpotLight. -->
<BorderBorderThickness="4"BorderBrush="PaleGreen"Margin="2">
<RectangleFill="LightGray"Height="20"/>
</Border>
</StackPanel>
Describe the problem this feature would solve
We deprecated our Light behavior; however, we pointed to a composition API which isn't as easy to use and requires some setup with code-behind.
Describe the solution
It'd be great to have another XAML helper in line with our other composition API XAML helpers for this scenario. Similar to what we want to do with ThemeShadows in #3122 as well.
I'd imagine being able to do the entire process from the composition example in XAML like so:
Option 1 - Organize Light with what it shines on together - (Mimic ThemeShadow API proposal #3122):
Option 2 - Tie to element being lit: