xyzzer / WinRTXamlToolkit

WinRT XAML Toolkit
Other
283 stars 66 forks source link

SetClipToBounds: View remains clipped after disabling clip to bounds #43

Open rigdern opened 7 years ago

rigdern commented 7 years ago

Repro

For example, if you execute the following code:

// Start clipping the view
WinRTXamlToolkit.Controls.Extensions.FrameworkElementExtensions.SetClipToBounds(view, true);
// Stop clipping the view
WinRTXamlToolkit.Controls.Extensions.FrameworkElementExtensions.SetClipToBounds(view, false);

Unexpected result: view is still clipped even though you've requested that it no longer be clipped to its bounds.

Expected result: view is no longer clipped.

Fix

This can be fixed by setting _fe.Clip = null in ClipToBoundsHandler's Detach method.