diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Default_Configuration_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Default_Configuration_VerifyVisualState.png new file mode 100644 index 000000000000..7b347219b7ac Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Default_Configuration_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Initial_Configuration_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Initial_Configuration_VerifyVisualState.png new file mode 100644 index 000000000000..7cf311715f76 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_Checking_Initial_Configuration_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_FlowDirectionAndContent_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_FlowDirectionAndContent_VerifyVisualState.png new file mode 100644 index 000000000000..0204567f86c6 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_FlowDirectionAndContent_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndCharacterSpacing_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndCharacterSpacing_VerifyVisualState.png new file mode 100644 index 000000000000..fca4c05e893e Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndCharacterSpacing_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontAttributes_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontAttributes_VerifyVisualState.png new file mode 100644 index 000000000000..3211ef3a01f6 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontAttributes_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontSize_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontSize_VerifyVisualState.png new file mode 100644 index 000000000000..ad0adc862045 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndFontSize_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndTextColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndTextColor_VerifyVisualState.png new file mode 100644 index 000000000000..f9b1ab0ca841 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetContentAndTextColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontAttributesAndTextColor_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontAttributesAndTextColor_VerifyVisualState.png new file mode 100644 index 000000000000..4f05c29b4639 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontAttributesAndTextColor_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontAttributes_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontAttributes_VerifyVisualState.png new file mode 100644 index 000000000000..f44b4f510ea8 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontAttributes_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontSize_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontSize_VerifyVisualState.png new file mode 100644 index 000000000000..749bfa6f47f1 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontFamilyAndFontSize_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontSizeAndFontAttributes_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontSizeAndFontAttributes_VerifyVisualState.png new file mode 100644 index 000000000000..706129dfbf39 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/RadioButton_SetFontSizeAndFontAttributes_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs index ae058bc9bc44..3ca199e661c7 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs @@ -67,6 +67,7 @@ public override string ToString() new GalleryPageFactory(() => new ListViewCoreGalleryPage(), "ListView Gallery"), new GalleryPageFactory(() => new PickerCoreGalleryPage(), "Picker Gallery"), new GalleryPageFactory(() => new ProgressBarCoreGalleryPage(), "Progress Bar Gallery"), + new GalleryPageFactory(() => new RadioButtonControlPage(), "RadioButton Feature Matrix"), new GalleryPageFactory(() => new RadioButtonCoreGalleryPage(), "RadioButton Gallery"), new GalleryPageFactory(() => new ScrollViewCoreGalleryPage(), "ScrollView Gallery"), new GalleryPageFactory(() => new SearchBarCoreGalleryPage(), "Search Bar Gallery"), @@ -79,7 +80,6 @@ public override string ToString() new GalleryPageFactory(() => new SliderControlPage(), "Slider Feature Matrix"), new GalleryPageFactory(() => new CollectionViewFeaturePage(), "CollectionView Feature Matrix"), new GalleryPageFactory(() => new CarouselViewFeaturePage(), "CarouselView Feature Matrix"), - }; public CorePageView(Page rootPage) diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml new file mode 100644 index 000000000000..720e45d417ad --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs new file mode 100644 index 000000000000..4abda43f23e5 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonControlPage.xaml.cs @@ -0,0 +1,52 @@ +using System; +using Microsoft.Maui.Controls; + +namespace Maui.Controls.Sample; + +public class RadioButtonControlPage : NavigationPage +{ + public RadioButtonControlPage() + { + PushAsync(new RadioButtonControlMainPage()); + } +} + +public partial class RadioButtonControlMainPage : ContentPage +{ + private RadioButtonViewModel _viewModel; + + public RadioButtonControlMainPage() + { + InitializeComponent(); + _viewModel = new RadioButtonViewModel(); + BindingContext = _viewModel; + } + + private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) + { + BindingContext = _viewModel = new RadioButtonViewModel(); + RadioButtonControlTwo.IsChecked = false; + RadioButtonControlThree.IsChecked = false; + RadioButtonControlFour.IsChecked = false; + RadioButtonControlFive.IsChecked = false; + SelectedValueLabelOne.Text = string.Empty; + SelectedValueLabelTwo.Text = string.Empty; + await Navigation.PushAsync(new RadioButtonOptionsPage(_viewModel)); + } + + private void RadioButton_CheckedChanged(object sender, CheckedChangedEventArgs e) + { + if (e.Value) + { + var radioButton = sender as RadioButton; + if (radioButton != null && radioButton.GroupName == "Theme") + { + SelectedValueLabelOne.Text = radioButton.Content.ToString(); + } + else + { + SelectedValueLabelTwo.Text = radioButton.Content.ToString(); + } + } + } +} diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml new file mode 100644 index 000000000000..8723f3bfb67f --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/RadioButton/RadioButtonOptionsPage.xaml @@ -0,0 +1,370 @@ + + + + + + + + + + +