RadRibbonRadioButton multiple selected if in different collapsed groups

4 posts, 0 answers
  1. Derek
    Derek avatar
    9 posts
    Member since:
    Nov 2011

    Posted 06 Dec 2011 Link to this post

    When I have two groups that are both collapsed and each group has a RadRibbonRadioButton with the same group name, multiple buttons are able to be selected.  We are using Runtime Version - v2.0.50727 and Version - 2011.2.1010.1040

    To Reproduce:
    Minimize the window until Group1 and Group2 are both collapsed
    Select Button3 from Group2
    Select Button1 from Group1
    Expand the window until both Group1 and Group2 are no longer collapsed

    Actual Result:
    Button1 and Button3 are now selected and the background changes color

    Expected Result:
    Button1 being the only one selected

    Note:  After the groups are expanded and you select a different radio button everything seems to work normally.  

    I have attached a sample code and also posted a video of how to reproduce it at - http://screencast.com/t/T7oOcUr7EyJR

    Lastly, if there is any sort of workaround for this please let me know. Thank you.

    App.xaml.cs
    public App()
    {
    this.Startup += this.Application_Startup;
    this.Exit += this.Application_Exit;
    this.UnhandledException += this.Application_UnhandledException;
     
    StyleManager.ApplicationTheme = new Windows7Theme();
     
    InitializeComponent();
    }


    MainPage.xaml
    <Grid x:Name="LayoutRoot" Background="White" >
        <telerik:RadRibbonView x:Name="radRibbonView">
            <telerik:RadRibbonTab Header="Home">
                <telerik:RadRibbonGroup Header="Group1">
     
                    <telerik:RadRibbonGroup.Variants>
                        <telerik:GroupVariant Variant="Collapsed" Priority="1" />
                    </telerik:RadRibbonGroup.Variants>
     
                    <telerik:RadRibbonRadioButton GroupName="Control" Text="Button1" />
     
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Group2">
                     
                    <telerik:RadRibbonGroup.Variants>
                        <telerik:GroupVariant Variant="Collapsed" Priority="2" />
                    </telerik:RadRibbonGroup.Variants>
                     
                    <telerik:RadRibbonRadioButton GroupName="Control" Text="Button2" />
                    <telerik:RadRibbonRadioButton GroupName="Control" Text="Button3" />
                    <telerik:RadRibbonRadioButton GroupName="Control" Text="Button4" />
     
                </telerik:RadRibbonGroup>
     
                <telerik:RadRibbonGroup Header="Group3">
                     
                    <telerik:RadRibbonGroup.Variants>
                        <telerik:GroupVariant Variant="Collapsed" Priority="3" />
                    </telerik:RadRibbonGroup.Variants>
                     
                    <telerik:RadRibbonButton Text="Button5" />
                    <telerik:RadRibbonButton Text="Button6" />
                    <telerik:RadRibbonButton Text="Button7" />
     
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </telerik:RadRibbonView>
    </Grid>

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 09 Dec 2011 Link to this post

    Hello Derek,

     The behavior you have come up with is expected. When the groups are collapsed and you open them, the buttons from the group are placed in a Popup. The key thing is that this Popup is from different Visual Tree than the uncollapsed RibbonGroups' VisualTree. In other words the buttons are re-created and when you expand the window and then the groups, these buttons are re-added as checked in their containers (the RadRibbonGroups). Let's make a quick test:

    <StackPanel x:Name="stack">
          <RadioButton GroupName="AAA" IsChecked="True" />
          <RadioButton GroupName="AAA" IsChecked="False" />
          <RadioButton GroupName="AAA" IsChecked="false" />
          <Button Click="Button_Click" />
      </StackPanel>
    private void Button_Click(object sender, RoutedEventArgs e)
            {
                RadioButton button = new RadioButton();
                button.IsChecked = true;
                button.GroupName = "AAA";
     
                this.stack.Children.Add(button);
            }
    When clicking the Button , it adds a Checked RadioButtons in the StackPanel and we have multiple checked radio buttons within the Group. The group logic will start after you click on some of the radios.

    Regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Derek
    Derek avatar
    9 posts
    Member since:
    Nov 2011

    Posted 09 Dec 2011 Link to this post

    Hello Petar,

    Thank you for your response.  In my previous post I also noticed the group background color would change after it was collapsed, buttons selected, and then expanded.  Should that be expected as well?  If so is there a property/event I can set to make it so it doesn't show the group background as if it were a selected collapsed button.

    This issue can be reproduced by following the steps in my previous post.

    Thank you,
    Derek
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Dec 2011 Link to this post

    Hello Derek,

     We managed to reproduce this issue and we logged it as a bug in our PITS where you are now able to track its status. We also updated your telerik account points as a thanks for your cooperation. Unfortunately, we are not aware of existing workarounds for this scenario.

    Best wishes,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top