Skip to content

Commit

Permalink
[housekeeping] Automated PR to fix formatting errors (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored May 28, 2024
1 parent 534c28d commit d6d6e18
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,45 +31,45 @@ public class MauiMediaElement : Grid, IDisposable
readonly Grid buttonContainer;
readonly Button fullScreenButton;
readonly MediaPlayerElement mediaPlayerElement;
static readonly FontIcon fullScreenIcon = new() { Glyph = "\uE740", FontFamily = new FontFamily("Segoe Fluent Icons")};
static readonly FontIcon fullScreenIcon = new() { Glyph = "\uE740", FontFamily = new FontFamily("Segoe Fluent Icons") };
static readonly FontIcon exitFullScreenIcon = new() { Glyph = "\uE73F", FontFamily = new FontFamily("Segoe Fluent Icons") };
bool doesNavigationBarExistBeforeFullScreen;
bool isDisposed;

/// <summary>
/// Initializes a new instance of the <see cref="MauiMediaElement"/> class.
/// </summary>
/// <param name="mediaPlayerElement"></param>
public MauiMediaElement(MediaPlayerElement mediaPlayerElement)
{
this.mediaPlayerElement = mediaPlayerElement;

fullScreenButton = new Button
{
Content = fullScreenIcon,
Background = new SolidColorBrush(Colors.Transparent),
Width = 45,
Height = 45
};
/// </summary>
/// <param name="mediaPlayerElement"></param>
public MauiMediaElement(MediaPlayerElement mediaPlayerElement)
{
this.mediaPlayerElement = mediaPlayerElement;

fullScreenButton = new Button
{
Content = fullScreenIcon,
Background = new SolidColorBrush(Colors.Transparent),
Width = 45,
Height = 45
};

buttonContainer = new Grid
{
HorizontalAlignment = Microsoft.UI.Xaml.HorizontalAlignment.Right,
VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Top,
Visibility = mediaPlayerElement.TransportControls.Visibility,
Width = 45,
Height = 45,
Margin = new Thickness(0, 20, 30, 0)
};
{
HorizontalAlignment = Microsoft.UI.Xaml.HorizontalAlignment.Right,
VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Top,
Visibility = mediaPlayerElement.TransportControls.Visibility,
Width = 45,
Height = 45,
Margin = new Thickness(0, 20, 30, 0)
};

fullScreenButton.Click += OnFullScreenButtonClick;
buttonContainer.Children.Add(fullScreenButton);
fullScreenButton.Click += OnFullScreenButtonClick;
buttonContainer.Children.Add(fullScreenButton);

Children.Add(this.mediaPlayerElement);
Children.Add(buttonContainer);
Children.Add(this.mediaPlayerElement);
Children.Add(buttonContainer);

mediaPlayerElement.PointerMoved += OnMediaPlayerElementPointerMoved;
}
mediaPlayerElement.PointerMoved += OnMediaPlayerElementPointerMoved;
}

/// <summary>
/// Finalizer
Expand Down Expand Up @@ -103,7 +103,7 @@ protected virtual void Dispose(bool disposing)

fullScreenButton.Click -= OnFullScreenButtonClick;
mediaPlayerElement.PointerMoved -= OnMediaPlayerElementPointerMoved;

if (disposing)
{
mediaPlayerElement.MediaPlayer.Dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.Maui.Behaviors;
public partial class IconTintColorBehavior
{
AView? nativeView;

/// <inheritdoc/>
protected override void OnAttachedTo(View bindable, AView platformView)
{
Expand All @@ -24,7 +24,7 @@ protected override void OnAttachedTo(View bindable, AView platformView)
bindable.PropertyChanged += OnElementPropertyChanged;
PropertyChanged += OnTintedImagePropertyChanged;
}

void OnTintedImagePropertyChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == TintColorProperty.PropertyName)
Expand Down

0 comments on commit d6d6e18

Please sign in to comment.