Skip to content

Commit 470cbc4

Browse files
github-actions[bot]PureWeen
authored andcommitted
[create-pull-request] automated change (#31576)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 21a0d23 commit 470cbc4

22 files changed

+1758
-1758
lines changed

src/Controls/tests/TestCases.HostApp/FeatureMatrix/AbsoluteLayout/AbsoluteLayoutOptionsPage.xaml.cs

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,75 +9,75 @@ namespace Maui.Controls.Sample;
99

1010
public partial class AbsoluteLayoutOptionsPage : ContentPage
1111
{
12-
private AbsoluteLayoutViewModel _viewModel;
13-
public AbsoluteLayoutOptionsPage(AbsoluteLayoutViewModel viewModel)
14-
{
15-
InitializeComponent();
16-
_viewModel = viewModel;
17-
BindingContext = _viewModel;
18-
}
12+
private AbsoluteLayoutViewModel _viewModel;
13+
public AbsoluteLayoutOptionsPage(AbsoluteLayoutViewModel viewModel)
14+
{
15+
InitializeComponent();
16+
_viewModel = viewModel;
17+
BindingContext = _viewModel;
18+
}
1919

20-
private void ApplyButton_Clicked(object sender, EventArgs e)
21-
{
22-
Navigation.PopAsync();
23-
}
20+
private void ApplyButton_Clicked(object sender, EventArgs e)
21+
{
22+
Navigation.PopAsync();
23+
}
2424

25-
private void OnLayoutFlagCheckedChanged(object sender, CheckedChangedEventArgs e)
26-
{
27-
AbsoluteLayoutFlags flags = AbsoluteLayoutFlags.None;
25+
private void OnLayoutFlagCheckedChanged(object sender, CheckedChangedEventArgs e)
26+
{
27+
AbsoluteLayoutFlags flags = AbsoluteLayoutFlags.None;
2828

29-
if (chkX.IsChecked)
30-
flags |= AbsoluteLayoutFlags.XProportional;
31-
if (chkY.IsChecked)
32-
flags |= AbsoluteLayoutFlags.YProportional;
33-
if (chkWidth.IsChecked)
34-
flags |= AbsoluteLayoutFlags.WidthProportional;
35-
if (chkHeight.IsChecked)
36-
flags |= AbsoluteLayoutFlags.HeightProportional;
37-
if (chkPosition.IsChecked)
38-
flags |= AbsoluteLayoutFlags.PositionProportional;
39-
if (chkSize.IsChecked)
40-
flags |= AbsoluteLayoutFlags.SizeProportional;
41-
if (chkAll.IsChecked)
42-
flags |= AbsoluteLayoutFlags.All;
29+
if (chkX.IsChecked)
30+
flags |= AbsoluteLayoutFlags.XProportional;
31+
if (chkY.IsChecked)
32+
flags |= AbsoluteLayoutFlags.YProportional;
33+
if (chkWidth.IsChecked)
34+
flags |= AbsoluteLayoutFlags.WidthProportional;
35+
if (chkHeight.IsChecked)
36+
flags |= AbsoluteLayoutFlags.HeightProportional;
37+
if (chkPosition.IsChecked)
38+
flags |= AbsoluteLayoutFlags.PositionProportional;
39+
if (chkSize.IsChecked)
40+
flags |= AbsoluteLayoutFlags.SizeProportional;
41+
if (chkAll.IsChecked)
42+
flags |= AbsoluteLayoutFlags.All;
4343

44-
if (chkNone.IsChecked)
45-
flags = AbsoluteLayoutFlags.None;
44+
if (chkNone.IsChecked)
45+
flags = AbsoluteLayoutFlags.None;
4646

47-
_viewModel.LayoutFlags = flags;
48-
}
47+
_viewModel.LayoutFlags = flags;
48+
}
4949

50-
private void IsVisibleRadio_CheckedChanged(object sender, CheckedChangedEventArgs e)
51-
{
52-
if (!(sender is RadioButton rb) || !rb.IsChecked)
53-
return;
54-
_viewModel.IsVisible = rb.Content?.ToString() == "True";
55-
}
50+
private void IsVisibleRadio_CheckedChanged(object sender, CheckedChangedEventArgs e)
51+
{
52+
if (!(sender is RadioButton rb) || !rb.IsChecked)
53+
return;
54+
_viewModel.IsVisible = rb.Content?.ToString() == "True";
55+
}
5656

57-
private void OnFlowDirectionChanged(object sender, EventArgs e)
58-
{
59-
_viewModel.FlowDirection = FlowDirectionLTR.IsChecked ? FlowDirection.LeftToRight : FlowDirection.RightToLeft;
60-
}
61-
62-
private void OnBackgroundColorChanged(object sender, EventArgs e)
63-
{
64-
if (BindingContext is AbsoluteLayoutViewModel vm && sender is Button button && button.Text is string color)
65-
{
66-
switch (color)
67-
{
68-
case "Red":
69-
vm.BackgroundColor = Colors.Red;
70-
break;
71-
case "Gray":
72-
vm.BackgroundColor = Colors.Gray;
73-
break;
74-
case "LightYellow":
75-
vm.BackgroundColor = Colors.LightYellow;
76-
break;
77-
default:
78-
vm.BackgroundColor = Colors.White;
79-
break;
80-
}
81-
}
82-
}
57+
private void OnFlowDirectionChanged(object sender, EventArgs e)
58+
{
59+
_viewModel.FlowDirection = FlowDirectionLTR.IsChecked ? FlowDirection.LeftToRight : FlowDirection.RightToLeft;
60+
}
61+
62+
private void OnBackgroundColorChanged(object sender, EventArgs e)
63+
{
64+
if (BindingContext is AbsoluteLayoutViewModel vm && sender is Button button && button.Text is string color)
65+
{
66+
switch (color)
67+
{
68+
case "Red":
69+
vm.BackgroundColor = Colors.Red;
70+
break;
71+
case "Gray":
72+
vm.BackgroundColor = Colors.Gray;
73+
break;
74+
case "LightYellow":
75+
vm.BackgroundColor = Colors.LightYellow;
76+
break;
77+
default:
78+
vm.BackgroundColor = Colors.White;
79+
break;
80+
}
81+
}
82+
}
8383
}

src/Controls/tests/TestCases.HostApp/FeatureMatrix/AbsoluteLayout/AbsoluteLayoutViewModel.cs

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -7,85 +7,85 @@ namespace Maui.Controls.Sample;
77

88
public class AbsoluteLayoutViewModel : INotifyPropertyChanged
99
{
10-
double _x = 0, _y = 0;
11-
double _width = AbsoluteLayout.AutoSize;
12-
double _height = AbsoluteLayout.AutoSize;
13-
private bool _isVisible = true;
14-
private Color _backgroundColor = Colors.Lavender;
15-
private FlowDirection _flowDirection = FlowDirection.LeftToRight;
16-
AbsoluteLayoutFlags _layoutFlags = AbsoluteLayoutFlags.None;
17-
public Rect Bounds => new Rect(X, Y, Width, Height);
10+
double _x = 0, _y = 0;
11+
double _width = AbsoluteLayout.AutoSize;
12+
double _height = AbsoluteLayout.AutoSize;
13+
private bool _isVisible = true;
14+
private Color _backgroundColor = Colors.Lavender;
15+
private FlowDirection _flowDirection = FlowDirection.LeftToRight;
16+
AbsoluteLayoutFlags _layoutFlags = AbsoluteLayoutFlags.None;
17+
public Rect Bounds => new Rect(X, Y, Width, Height);
1818

19-
public double X
20-
{
21-
get => _x;
22-
set { _x = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
23-
}
19+
public double X
20+
{
21+
get => _x;
22+
set { _x = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
23+
}
2424

25-
public double Y
26-
{
27-
get => _y;
28-
set { _y = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
29-
}
25+
public double Y
26+
{
27+
get => _y;
28+
set { _y = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
29+
}
3030

31-
public double Width
32-
{
33-
get => _width;
34-
set { _width = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
35-
}
31+
public double Width
32+
{
33+
get => _width;
34+
set { _width = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
35+
}
3636

37-
public double Height
38-
{
39-
get => _height;
40-
set { _height = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
41-
}
37+
public double Height
38+
{
39+
get => _height;
40+
set { _height = value; OnPropertyChanged(); OnPropertyChanged(nameof(Bounds)); }
41+
}
4242

43-
public AbsoluteLayoutFlags LayoutFlags
44-
{
45-
get => _layoutFlags;
46-
set { _layoutFlags = value; OnPropertyChanged(); }
47-
}
43+
public AbsoluteLayoutFlags LayoutFlags
44+
{
45+
get => _layoutFlags;
46+
set { _layoutFlags = value; OnPropertyChanged(); }
47+
}
4848

49-
public Color BackgroundColor
50-
{
51-
get => _backgroundColor;
52-
set
53-
{
54-
if (_backgroundColor != value)
55-
{
56-
_backgroundColor = value;
57-
OnPropertyChanged();
58-
}
59-
}
60-
}
49+
public Color BackgroundColor
50+
{
51+
get => _backgroundColor;
52+
set
53+
{
54+
if (_backgroundColor != value)
55+
{
56+
_backgroundColor = value;
57+
OnPropertyChanged();
58+
}
59+
}
60+
}
6161

62-
public bool IsVisible
63-
{
64-
get => _isVisible;
65-
set
66-
{
67-
if (_isVisible != value)
68-
{
69-
_isVisible = value;
70-
OnPropertyChanged();
71-
}
72-
}
73-
}
62+
public bool IsVisible
63+
{
64+
get => _isVisible;
65+
set
66+
{
67+
if (_isVisible != value)
68+
{
69+
_isVisible = value;
70+
OnPropertyChanged();
71+
}
72+
}
73+
}
7474

75-
public FlowDirection FlowDirection
76-
{
77-
get => _flowDirection;
78-
set
79-
{
80-
if (_flowDirection != value)
81-
{
82-
_flowDirection = value;
83-
OnPropertyChanged();
84-
}
85-
}
86-
}
87-
88-
public event PropertyChangedEventHandler PropertyChanged;
89-
protected void OnPropertyChanged([CallerMemberName] string propertyName = "") =>
90-
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
75+
public FlowDirection FlowDirection
76+
{
77+
get => _flowDirection;
78+
set
79+
{
80+
if (_flowDirection != value)
81+
{
82+
_flowDirection = value;
83+
OnPropertyChanged();
84+
}
85+
}
86+
}
87+
88+
public event PropertyChangedEventHandler PropertyChanged;
89+
protected void OnPropertyChanged([CallerMemberName] string propertyName = "") =>
90+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
9191
}

0 commit comments

Comments
 (0)