File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
components/OpacityMaskView/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1616namespace CommunityToolkit . WinUI . Controls ;
1717
1818/// <summary>
19- /// TODO
19+ /// A control that applies an opacity mask to its content.
2020/// </summary>
2121[ TemplatePart ( Name = RootGridTemplateName , Type = typeof ( Grid ) ) ]
2222[ TemplatePart ( Name = MaskRectangleTemplateName , Type = typeof ( Rectangle ) ) ]
@@ -33,7 +33,11 @@ public partial class OpacityMaskView : ContentControl
3333 private const string MaskRectangleTemplateName = "PART_MaskRectangle" ;
3434 private const string RootGridTemplateName = "PART_RootGrid" ;
3535
36+ #if WINDOWS_WINAPPSDK
37+ private readonly Compositor _compositor = CompositionTarget . GetCompositorForCurrentThread ( ) ;
38+ #else
3639 private readonly Compositor _compositor = Window . Current . Compositor ;
40+ #endif
3741 private CompositionBrush ? _mask ;
3842 private CompositionMaskBrush ? _maskBrush ;
3943
You can’t perform that action at this time.
0 commit comments