-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Labels
area-RadioButtonsduplicateThis issue or pull request already existsThis issue or pull request already existsneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)team-ControlsIssue for the Controls teamIssue for the Controls team
Description
Describe the bug
Only one of implicitly grouped RadioButtons can be set to IsChecked programmatically.
Steps to reproduce the bug
<Page
x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Button>
<Button.Flyout>
<Flyout>
<StackPanel>
<RadioButton x:Name="RadioButton1" IsChecked="True" />
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
<Button>
<Button.Flyout>
<Flyout>
<StackPanel>
<RadioButton x:Name="RadioButton2" IsChecked="True" />
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
</Grid>
</Page>using System.Diagnostics;
using Windows.UI.Xaml.Controls;
namespace App1
{
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
Debug.WriteLine(RadioButton1.IsChecked);
Debug.WriteLine(RadioButton2.IsChecked);
}
}
}Expected behavior
True
True
Actual behavior
False
True
Version Info
| Windows 10 version | Saw the problem? |
|---|---|
| May 2019 Update (18362) | Yes |
| Device form factor | Saw the problem? |
|---|---|
| Desktop | Yes |
Metadata
Metadata
Assignees
Labels
area-RadioButtonsduplicateThis issue or pull request already existsThis issue or pull request already existsneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)team-ControlsIssue for the Controls teamIssue for the Controls team