This repository was archived by the owner on May 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ public RemoveBorderEffect()
16
16
#elif __ANDROID__
17
17
if ( DateTime . Now . Ticks < 0 )
18
18
_ = new Xamarin . CommunityToolkit . Android . Effects . RemoveBorderEffect ( ) ;
19
+ #elif UWP
20
+ if ( System . DateTime . Now . Ticks < 0 )
21
+ _ = new Xamarin . CommunityToolkit . UWP . Effects . RemoveBorderEffect ( ) ;
19
22
#endif
20
23
#endregion
21
24
}
Original file line number Diff line number Diff line change
1
+ using Windows . UI . Xaml ;
2
+ using Windows . UI . Xaml . Controls ;
3
+ using Xamarin . CommunityToolkit . Effects ;
4
+ using Xamarin . Forms . Platform . UWP ;
5
+ using Effects = Xamarin . CommunityToolkit . UWP . Effects ;
6
+
7
+ [ assembly: Xamarin . Forms . ExportEffect ( typeof ( Effects . RemoveBorderEffect ) , nameof ( RemoveBorderEffect ) ) ]
8
+
9
+ namespace Xamarin . CommunityToolkit . UWP . Effects
10
+ {
11
+ public class RemoveBorderEffect : PlatformEffect
12
+ {
13
+ Thickness oldBorderThickness ;
14
+
15
+ protected override void OnAttached ( )
16
+ {
17
+ if ( Control is Control uwpControl )
18
+ {
19
+ oldBorderThickness = uwpControl . BorderThickness ;
20
+ uwpControl . BorderThickness = new Thickness ( 0.0 ) ;
21
+ }
22
+ }
23
+
24
+ protected override void OnDetached ( )
25
+ {
26
+ if ( Control is Control uwpControl )
27
+ {
28
+ uwpControl . BorderThickness = oldBorderThickness ;
29
+ }
30
+ }
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments