Skip to content

Commit d89f293

Browse files
github-actions[bot]PureWeen
authored andcommitted
[create-pull-request] automated change (#30184)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5b9bccd commit d89f293

File tree

12 files changed

+351
-351
lines changed

12 files changed

+351
-351
lines changed

src/BlazorWebView/tests/MauiDeviceTests/WebViewHelpers.Windows.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static partial class WebViewHelpers
1111
public static async Task WaitForWebViewReady(WebView2 wv2)
1212
{
1313
CoreWebView2 coreWebView2 = null;
14-
14+
1515
// Ensure that the WebView2 runtime is installed and initialized and has a CoreWebView2 instance.
1616
if (wv2?.CoreWebView2 == null)
1717
{

src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ protected bool IsBackButtonVisible(IElementHandler handler)
222222
protected void AssertTranslationMatches(Android.Views.View nativeView, double expectedTranslationX, double expectedTranslationY)
223223
{
224224
var context = nativeView?.Context ?? throw new InvalidOperationException("Context cannot be null.");
225-
225+
226226
var expectedXInPixels = context.ToPixels(expectedTranslationX);
227227
Assert.Equal(expectedXInPixels, nativeView.TranslationX, precision: 1);
228-
228+
229229
var expectedYInPixels = context.ToPixels(expectedTranslationY);
230230
Assert.Equal(expectedYInPixels, nativeView.TranslationY, precision: 1);
231231
}

src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Task<bool> GetPlatformIsVisible(ShapeViewHandler boxViewViewHandler)
126126
return nativeView.Visibility == Android.Views.ViewStates.Visible;
127127
});
128128
}
129-
129+
130130
//src/Compatibility/Core/tests/Android/TranslationTests.cs
131131
[Fact]
132132
[Description("The Translation property of a BoxView should match with native Translation")]

src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Task<bool> GetPlatformIsVisible(CheckBoxHandler checkBoxHandler)
122122
return nativeView.Visibility == Android.Views.ViewStates.Visible;
123123
});
124124
}
125-
125+
126126
//src/Compatibility/Core/tests/Android/TranslationTests.cs
127127
[Fact]
128128
[Description("The Translation property of a CheckBox should match with native Translation")]

src/Controls/tests/TestCases.HostApp/FeatureMatrix/Image/ImageViewModel.cs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.ComponentModel;
22
using System.Runtime.CompilerServices;
3-
using Microsoft.Maui.Graphics;
43
using Microsoft.Maui.Controls;
4+
using Microsoft.Maui.Graphics;
55
namespace Maui.Controls.Sample;
66

77
public class ImageViewModel : INotifyPropertyChanged
@@ -117,40 +117,40 @@ private void UpdateFontImageSource()
117117
}
118118
}
119119

120-
public bool HasShadow
121-
{
122-
get => _hasShadow;
123-
set
124-
{
125-
if (_hasShadow != value)
126-
{
127-
_hasShadow = value;
128-
ImageShadow = value
129-
? new Shadow
130-
{
131-
Radius = 10,
132-
Opacity = 1.0f,
133-
Brush = Colors.Black.AsPaint(),
134-
Offset = new Point(5, 5)
135-
}
136-
: null;
137-
OnPropertyChanged(nameof(HasShadow));
138-
}
139-
}
140-
}
141-
142-
public Shadow ImageShadow
143-
{
144-
get => _imageShadow;
145-
private set
146-
{
147-
if (_imageShadow != value)
148-
{
149-
_imageShadow = value;
150-
OnPropertyChanged(nameof(ImageShadow));
151-
}
152-
}
153-
}
120+
public bool HasShadow
121+
{
122+
get => _hasShadow;
123+
set
124+
{
125+
if (_hasShadow != value)
126+
{
127+
_hasShadow = value;
128+
ImageShadow = value
129+
? new Shadow
130+
{
131+
Radius = 10,
132+
Opacity = 1.0f,
133+
Brush = Colors.Black.AsPaint(),
134+
Offset = new Point(5, 5)
135+
}
136+
: null;
137+
OnPropertyChanged(nameof(HasShadow));
138+
}
139+
}
140+
}
141+
142+
public Shadow ImageShadow
143+
{
144+
get => _imageShadow;
145+
private set
146+
{
147+
if (_imageShadow != value)
148+
{
149+
_imageShadow = value;
150+
OnPropertyChanged(nameof(ImageShadow));
151+
}
152+
}
153+
}
154154

155155
public event PropertyChangedEventHandler PropertyChanged;
156156

src/Controls/tests/TestCases.HostApp/FeatureMatrix/ImageButton/ImageButtonControlPage.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ private void OnImageButtonClicked(object sender, EventArgs e)
3535
{
3636
_viewModel.ClickTotal++;
3737
_viewModel.IsButtonClicked = true;
38-
}
38+
}
3939

4040
private void OnImageButtonPressed(object sender, EventArgs e)
4141
{
4242
_viewModel.PressedTotal++;
4343
_viewModel.IsButtonClicked = true;
44-
}
44+
}
4545

4646
private void OnImageButtonReleased(object sender, EventArgs e)
4747
{
4848
_viewModel.ReleasedTotal++;
4949
_viewModel.IsButtonClicked = true;
50-
}
50+
}
5151
}

src/Controls/tests/TestCases.HostApp/FeatureMatrix/ImageButton/ImageButtonOptionsPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private void OnCornerRadiusChanged(object sender, TextChangedEventArgs e)
186186
int.TryParse(parts[2], out int bottomLeft) &&
187187
int.TryParse(parts[3], out int bottomRight))
188188
{
189-
_viewModel.CornerRadius = topLeft;
189+
_viewModel.CornerRadius = topLeft;
190190
}
191191
else if (parts.Length == 1 && int.TryParse(parts[0], out int uniform))
192192
{

src/Controls/tests/TestCases.HostApp/FeatureMatrix/ImageButton/ImageButtonViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.ComponentModel;
22
using System.Runtime.CompilerServices;
3-
using Microsoft.Maui.Graphics;
4-
using Microsoft.Maui.Controls;
53
using System.Windows.Input;
4+
using Microsoft.Maui.Controls;
5+
using Microsoft.Maui.Graphics;
66

77
namespace Maui.Controls.Sample;
88

src/Controls/tests/TestCases.HostApp/FeatureMatrix/ProgressBar/ProgressBarControlPage.xaml.cs

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -2,110 +2,110 @@ namespace Maui.Controls.Sample;
22

33
public partial class ProgressBarControlPage : ContentPage
44
{
5-
private ProgressBarViewModel _viewModel;
6-
private ProgressBar progressBar;
5+
private ProgressBarViewModel _viewModel;
6+
private ProgressBar progressBar;
77

8-
public ProgressBarControlPage()
9-
{
10-
InitializeComponent();
11-
_viewModel = new ProgressBarViewModel();
12-
BindingContext = _viewModel;
13-
}
8+
public ProgressBarControlPage()
9+
{
10+
InitializeComponent();
11+
_viewModel = new ProgressBarViewModel();
12+
BindingContext = _viewModel;
13+
}
1414

15-
private void ReinitializeProgressBar()
16-
{
17-
BindingContext = _viewModel = new ProgressBarViewModel();
18-
ProgressBarGrid.Children.Clear();
19-
progressBar = new ProgressBar
20-
{
21-
AutomationId = "ProgressBarControl",
22-
};
15+
private void ReinitializeProgressBar()
16+
{
17+
BindingContext = _viewModel = new ProgressBarViewModel();
18+
ProgressBarGrid.Children.Clear();
19+
progressBar = new ProgressBar
20+
{
21+
AutomationId = "ProgressBarControl",
22+
};
2323

24-
progressBar.SetBinding(ProgressBar.BackgroundColorProperty, nameof(ProgressBarViewModel.BackgroundColor));
25-
progressBar.SetBinding(ProgressBar.FlowDirectionProperty, nameof(ProgressBarViewModel.FlowDirection));
26-
progressBar.SetBinding(ProgressBar.IsVisibleProperty, nameof(ProgressBarViewModel.IsVisible));
27-
progressBar.SetBinding(ProgressBar.ProgressProperty, nameof(ProgressBarViewModel.Progress));
28-
progressBar.SetBinding(ProgressBar.ProgressColorProperty, nameof(ProgressBarViewModel.ProgressColor));
29-
progressBar.SetBinding(ProgressBar.ShadowProperty, nameof(ProgressBarViewModel.Shadow));
30-
ProgressBarGrid.Children.Add(progressBar);
31-
}
24+
progressBar.SetBinding(ProgressBar.BackgroundColorProperty, nameof(ProgressBarViewModel.BackgroundColor));
25+
progressBar.SetBinding(ProgressBar.FlowDirectionProperty, nameof(ProgressBarViewModel.FlowDirection));
26+
progressBar.SetBinding(ProgressBar.IsVisibleProperty, nameof(ProgressBarViewModel.IsVisible));
27+
progressBar.SetBinding(ProgressBar.ProgressProperty, nameof(ProgressBarViewModel.Progress));
28+
progressBar.SetBinding(ProgressBar.ProgressColorProperty, nameof(ProgressBarViewModel.ProgressColor));
29+
progressBar.SetBinding(ProgressBar.ShadowProperty, nameof(ProgressBarViewModel.Shadow));
30+
ProgressBarGrid.Children.Add(progressBar);
31+
}
3232

33-
private void OnProgressChanged(object sender, TextChangedEventArgs e)
34-
{
35-
if (double.TryParse(ProgressEntry.Text, out double progress))
36-
{
37-
_viewModel.Progress = progress;
38-
}
39-
}
33+
private void OnProgressChanged(object sender, TextChangedEventArgs e)
34+
{
35+
if (double.TryParse(ProgressEntry.Text, out double progress))
36+
{
37+
_viewModel.Progress = progress;
38+
}
39+
}
4040

41-
private void ProgressColorButton_Clicked(object sender, EventArgs e)
42-
{
43-
var button = (Button)sender;
44-
if (button.Text == "Green")
45-
_viewModel.ProgressColor = Colors.Green;
46-
else if (button.Text == "Red")
47-
_viewModel.ProgressColor = Colors.Red;
48-
}
41+
private void ProgressColorButton_Clicked(object sender, EventArgs e)
42+
{
43+
var button = (Button)sender;
44+
if (button.Text == "Green")
45+
_viewModel.ProgressColor = Colors.Green;
46+
else if (button.Text == "Red")
47+
_viewModel.ProgressColor = Colors.Red;
48+
}
4949

50-
private void BackgroundColorButton_Clicked(object sender, EventArgs e)
51-
{
52-
var button = (Button)sender;
53-
if (button.Text == "Orange")
54-
_viewModel.BackgroundColor = Colors.Orange;
55-
else if (button.Text == "Light Blue")
56-
_viewModel.BackgroundColor = Colors.LightBlue;
57-
}
50+
private void BackgroundColorButton_Clicked(object sender, EventArgs e)
51+
{
52+
var button = (Button)sender;
53+
if (button.Text == "Orange")
54+
_viewModel.BackgroundColor = Colors.Orange;
55+
else if (button.Text == "Light Blue")
56+
_viewModel.BackgroundColor = Colors.LightBlue;
57+
}
5858

59-
private void OnIsVisibleCheckedChanged(object sender, CheckedChangedEventArgs e)
60-
{
61-
var radioButton = sender as RadioButton;
62-
if (radioButton != null && radioButton.IsChecked)
63-
{
64-
_viewModel.IsVisible = false;
65-
}
66-
}
59+
private void OnIsVisibleCheckedChanged(object sender, CheckedChangedEventArgs e)
60+
{
61+
var radioButton = sender as RadioButton;
62+
if (radioButton != null && radioButton.IsChecked)
63+
{
64+
_viewModel.IsVisible = false;
65+
}
66+
}
6767

68-
private void OnFlowDirectionChanged(object sender, EventArgs e)
69-
{
70-
var radioButton = sender as RadioButton;
71-
if (radioButton != null && radioButton.IsChecked)
72-
{
73-
_viewModel.FlowDirection = radioButton.Content.ToString() == "LTR" ? FlowDirection.LeftToRight : FlowDirection.RightToLeft;
74-
}
75-
}
68+
private void OnFlowDirectionChanged(object sender, EventArgs e)
69+
{
70+
var radioButton = sender as RadioButton;
71+
if (radioButton != null && radioButton.IsChecked)
72+
{
73+
_viewModel.FlowDirection = radioButton.Content.ToString() == "LTR" ? FlowDirection.LeftToRight : FlowDirection.RightToLeft;
74+
}
75+
}
7676

77-
private void OnShadowCheckedChanged(object sender, CheckedChangedEventArgs e)
78-
{
79-
var radioButton = (RadioButton)sender;
80-
if (radioButton != null && radioButton.IsChecked)
81-
{
82-
_viewModel.Shadow = new Shadow { Brush = Colors.Violet, Radius = 20, Offset = new Point(0, 0), Opacity = 1f };
83-
}
84-
}
77+
private void OnShadowCheckedChanged(object sender, CheckedChangedEventArgs e)
78+
{
79+
var radioButton = (RadioButton)sender;
80+
if (radioButton != null && radioButton.IsChecked)
81+
{
82+
_viewModel.Shadow = new Shadow { Brush = Colors.Violet, Radius = 20, Offset = new Point(0, 0), Opacity = 1f };
83+
}
84+
}
8585

86-
private void ProgressToButton_Clicked(object sender, EventArgs e)
87-
{
88-
if (!string.IsNullOrWhiteSpace(ProgressToEntry.Text))
89-
{
90-
if (progressBar == null)
91-
{
92-
progressBarControl.ProgressTo(double.Parse(ProgressToEntry.Text), 1000, Easing.Linear);
93-
}
94-
else
95-
{
96-
progressBar.ProgressTo(double.Parse(ProgressToEntry.Text), 1000, Easing.Linear);
97-
}
98-
}
99-
}
86+
private void ProgressToButton_Clicked(object sender, EventArgs e)
87+
{
88+
if (!string.IsNullOrWhiteSpace(ProgressToEntry.Text))
89+
{
90+
if (progressBar == null)
91+
{
92+
progressBarControl.ProgressTo(double.Parse(ProgressToEntry.Text), 1000, Easing.Linear);
93+
}
94+
else
95+
{
96+
progressBar.ProgressTo(double.Parse(ProgressToEntry.Text), 1000, Easing.Linear);
97+
}
98+
}
99+
}
100100

101-
private void ResetButton_Clicked(object sender, EventArgs e)
102-
{
103-
ProgressEntry.Text = "0.50";
104-
ProgressToEntry.Text = "0";
105-
IsVisibleTrueRadio.IsChecked = false;
106-
FlowDirectionLTR.IsChecked = false;
107-
FlowDirectionRTL.IsChecked = false;
108-
ShadowFalseRadio.IsChecked = false;
109-
ReinitializeProgressBar();
110-
}
101+
private void ResetButton_Clicked(object sender, EventArgs e)
102+
{
103+
ProgressEntry.Text = "0.50";
104+
ProgressToEntry.Text = "0";
105+
IsVisibleTrueRadio.IsChecked = false;
106+
FlowDirectionLTR.IsChecked = false;
107+
FlowDirectionRTL.IsChecked = false;
108+
ShadowFalseRadio.IsChecked = false;
109+
ReinitializeProgressBar();
110+
}
111111
}

0 commit comments

Comments
 (0)