dotnet / dotnet/maui-samples

Runtime error with RadioButtonDemos : GroupedRadioButtonsPage

Open
#258 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I am using Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.4.0 Preview 1.0 on Windows 11.
1. When you run RadioButtonDemos app under Windows 11 and select "Implement grouped RadioButtons in XAML", you get
the following runtime error as soon as the page appears -
> Runtime error with RadioButtonDemos : GroupedRadioButtonsPageRadioButtonDemos.GroupedRadioButtonsPage.OnFruitsRadioButtonCheckedChanged(Object sender, CheckedChangedEventArgs e) in C:\Dev\GitHub_proj\maui-samples\6.0\UserInterface\Views\RadioButtonDemos\RadioButtonDemos\Views\GroupedRadioButtonsPage.xaml.cs:line 19

It appears all the radio buttons are selected and the label reference is null : fruitLabel.Text = $"You have chosen: {button.Content}";

Running the same scenario with the Android app on an Android tablet, all of the fruit radio buttons are selected but no null reference error.

The selection "Implement grouped RadioButtons in code" runs without error.

2. With the "Assign a View to the Content property" selection:
On an Android tablet, you cannot select the "When a ControlTemplate is applied, a View can be assigned to RadioButton.Content on every platform:" radio button.
On Windows 11cat the image fills the screen.

3. With the "RadioButton ControlTemplate" selectio:
On an Android tablet, you cannot select any of the radio buttons
On Windows 11, the each radio button image obscures the label but you can select the radio button

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.