Search

Radio Buttons grouped under different parents don't group properly during initial load by jbest23

Active

0
0
Sign in
to vote
Type: Bug
ID: 779015
Opened: 2/11/2013 5:31:03 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When loading a xaml element which has two groups of radio buttons, grouped by being in different parent elements, I cannot have more than one radio button from the different groups selected at the same time by default.
Details (expand)

Product Version?

 

Blend for Visual Studio 2012

Language?

C#

Issue Type?

Bug

Repro Steps? (N/A for Suggestion)

I have created two groups of radio buttons, but instead of grouping them with the GroupName property, I have simply placed them in two different StackPanels on the same custom control.

In my xaml, I have:

            <StackPanel Grid.Row="0" Margin="0,20,0,20">
                <TextBlock VerticalAlignment="Top"
                    Text="Radio Group 1" />
                <RadioButton Name="rbOne" IsChecked="True" >One</RadioButton>
                <RadioButton Name="rbTwo">Two</RadioButton>
                <RadioButton Name="rbThree">Three</RadioButton>
            </StackPanel>

            <StackPanel Grid.Row="1" Margin="0,20,0,20">
                <TextBlock VerticalAlignment="Top"
                    Text="Radio Group 2" />
                <RadioButton Name="rbA" IsChecked="True">A</RadioButton>
                <RadioButton Name="rbB" >B</RadioButton>
                <RadioButton Name="rbC">C</RadioButton>
            </StackPanel>


When I load my project, I expect to see both One and A checked. However, I only see A checked. The grouping-by-parent-element works when I try to interact with the buttons: I can select one radio button from group 1, and one from group 2. But every time I load it, I can only get A selected by default after first load.

Grouping my radio buttons by GroupName solves the problem. But if grouping-by-parent-element is a supported means of grouping buttons, I shouldn't need to use GroupName IN ADDITION to separate stack panels.
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.