Windowscommunitytoolkit: Can't Remove Light Effect

Created on 12 Oct 2018  路  8Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

I'm submitting a...



Bug report (I searched for similar issues and did not find one)



Current behavior


After using a Light animation, there's no obvious way to remove the effect.

Expected behavior


FrameworkElement.Light(0, 0).Start() would remove the effect. But it only removes the spotlight, not the shadow.

Minimal reproduction of the problem with instructions

await myFrameworkElement.Light(10, 1200).StartAsync(); 
await myFrameworkElement.Light(0, 0).StartAsync();

Environment

Nuget Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [x] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [x] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [x] 2017 (version: 15.8.7)
- [ ] 2017 Preview (version: )

animations help wanted

All 8 comments

Hi @seanocali, thanks for reporting the issue! Could you submit a reproduction project?

If I understand this correctly, the ask here is to add a way to remove the visual effect completely? If so, I wonder if it makes sense to add an extensin method to do that?

@JustinXinLiu might have some thoughts on this as well

The current Light implementation is dated and will likely be replaced by XamlLight in the future. For the time being, I'd recommend to roll your own.

IMO, the current implementation should be deprecated and replaced with an implementation based on XamlLight

According to the XamlLight documentation, the minimum version supported is the Creators Update. By the current supported platforms of the toolkit, we could already start working on it.

@kbrons, could you submit a PR to just deprecate the current light implementation and point developers to XamlLight?

Light is now deprecated

Was this page helpful?
0 / 5 - 0 ratings