@@ -31,45 +31,45 @@ public class MauiMediaElement : Grid, IDisposable
31
31
readonly Grid buttonContainer ;
32
32
readonly Button fullScreenButton ;
33
33
readonly MediaPlayerElement mediaPlayerElement ;
34
- static readonly FontIcon fullScreenIcon = new ( ) { Glyph = "\uE740 " , FontFamily = new FontFamily ( "Segoe Fluent Icons" ) } ;
34
+ static readonly FontIcon fullScreenIcon = new ( ) { Glyph = "\uE740 " , FontFamily = new FontFamily ( "Segoe Fluent Icons" ) } ;
35
35
static readonly FontIcon exitFullScreenIcon = new ( ) { Glyph = "\uE73F " , FontFamily = new FontFamily ( "Segoe Fluent Icons" ) } ;
36
36
bool doesNavigationBarExistBeforeFullScreen ;
37
37
bool isDisposed ;
38
38
39
39
/// <summary>
40
40
/// Initializes a new instance of the <see cref="MauiMediaElement"/> class.
41
- /// </summary>
42
- /// <param name="mediaPlayerElement"></param>
43
- public MauiMediaElement ( MediaPlayerElement mediaPlayerElement )
44
- {
45
- this . mediaPlayerElement = mediaPlayerElement ;
46
-
47
- fullScreenButton = new Button
48
- {
49
- Content = fullScreenIcon ,
50
- Background = new SolidColorBrush ( Colors . Transparent ) ,
51
- Width = 45 ,
52
- Height = 45
53
- } ;
54
-
41
+ /// </summary>
42
+ /// <param name="mediaPlayerElement"></param>
43
+ public MauiMediaElement ( MediaPlayerElement mediaPlayerElement )
44
+ {
45
+ this . mediaPlayerElement = mediaPlayerElement ;
46
+
47
+ fullScreenButton = new Button
48
+ {
49
+ Content = fullScreenIcon ,
50
+ Background = new SolidColorBrush ( Colors . Transparent ) ,
51
+ Width = 45 ,
52
+ Height = 45
53
+ } ;
54
+
55
55
buttonContainer = new Grid
56
- {
57
- HorizontalAlignment = Microsoft . UI . Xaml . HorizontalAlignment . Right ,
58
- VerticalAlignment = Microsoft . UI . Xaml . VerticalAlignment . Top ,
59
- Visibility = mediaPlayerElement . TransportControls . Visibility ,
60
- Width = 45 ,
61
- Height = 45 ,
62
- Margin = new Thickness ( 0 , 20 , 30 , 0 )
63
- } ;
56
+ {
57
+ HorizontalAlignment = Microsoft . UI . Xaml . HorizontalAlignment . Right ,
58
+ VerticalAlignment = Microsoft . UI . Xaml . VerticalAlignment . Top ,
59
+ Visibility = mediaPlayerElement . TransportControls . Visibility ,
60
+ Width = 45 ,
61
+ Height = 45 ,
62
+ Margin = new Thickness ( 0 , 20 , 30 , 0 )
63
+ } ;
64
64
65
- fullScreenButton . Click += OnFullScreenButtonClick ;
66
- buttonContainer . Children . Add ( fullScreenButton ) ;
65
+ fullScreenButton . Click += OnFullScreenButtonClick ;
66
+ buttonContainer . Children . Add ( fullScreenButton ) ;
67
67
68
- Children . Add ( this . mediaPlayerElement ) ;
69
- Children . Add ( buttonContainer ) ;
68
+ Children . Add ( this . mediaPlayerElement ) ;
69
+ Children . Add ( buttonContainer ) ;
70
70
71
- mediaPlayerElement . PointerMoved += OnMediaPlayerElementPointerMoved ;
72
- }
71
+ mediaPlayerElement . PointerMoved += OnMediaPlayerElementPointerMoved ;
72
+ }
73
73
74
74
/// <summary>
75
75
/// Finalizer
@@ -103,7 +103,7 @@ protected virtual void Dispose(bool disposing)
103
103
104
104
fullScreenButton . Click -= OnFullScreenButtonClick ;
105
105
mediaPlayerElement . PointerMoved -= OnMediaPlayerElementPointerMoved ;
106
-
106
+
107
107
if ( disposing )
108
108
{
109
109
mediaPlayerElement . MediaPlayer . Dispose ( ) ;
0 commit comments