Extend a RadRibbonBarGroup

7 posts, 0 answers
  1. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 13 Dec 2012 Link to this post

    I would like to extend a RadRibbonBarGroup to make a group with a set of RadButtonElements.  Can that be done...easily?
  2. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 18 Dec 2012 Link to this post

    Hello Gary,

    Thank you for writing.

    If you would like to add buttons to a RibbonBarGroup please have a look at the following article: http://www.telerik.com/help/winforms/ribbonbar-getting-started.html. If the article is not helpful, I kindly ask you to explain in a bit more details what exactly you would like to achieve.

    I am looking forward to your reply.

    Kind regards,
    Boryana
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 18 Dec 2012 Link to this post

    Thank you, Boryana.  I attached a picture to show what I would like to do.
  5. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 20 Dec 2012 Link to this post

    Hello Gary,

    Thank you for the clarification.

    Technically, you can extend the RadRibbonBarGroup and fill its Items collection with six buttons. However, the efficiency of this approach is controversial. A ribbon group is not a standalone component and, therefore, once inherited, it can no longer be used at design-time. In other words you will need to add the group manually at run-time.

    I have prepared a sample project that indeed extends the RadRibbonBarGroup only to add the buttons and adds an instance of the custom class to a RibbonTab. I hope you will find it useful.

    Let me know if you have further queries. I will do my best to assist you.

    All the best,
    Boryana
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  6. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 20 Dec 2012 Link to this post

    Thank you, Boryana.  Your answer settles the matter for me.
  7. Vijay
    Vijay avatar
    29 posts
    Member since:
    Nov 2011

    Posted 30 Dec 2012 Link to this post

    Hello Gary,

    I suggest you could take a look at below code. Hope you could try something similar as this:

    <Grid x:Name="LayoutRoot" Width="622">
     <Grid.RowDefinitions>
     <RowDefinition Height="Auto">
     </RowDefinition>
     
     <RowDefinition>
     </RowDefinition>
     </Grid.RowDefinitions>
     <telerik:RadRibbonView x:Name="ribbonView1"
     ApplicationName="Rad Ribbon Arthmetic - WCF Service"
     Title="Telerik"
     IsMinimized="False">
     
     <telerik:RadRibbonTab Header="Telerik Rad Ribbon View - WCF service">
     
     <telerik:RadRibbonGroup Name="ribbonGroup1"
     Header="Rad Ribbon Add"
     HorizontalAlignment="Center">
     
     <telerik:RadRibbonButton Content="Addition"
     Name="btnAdd"
     Click="btnAdd_Click" >
     </telerik:RadRibbonButton>
     </telerik:RadRibbonGroup >
     
    <telerik:RadRibbonGroup Name="ribbonGroup2"
     Header="Rad Ribbon Sub"
     HorizontalAlignment="Center" >
     
     <telerik:RadRibbonButton Content="Subtraction"
     Name="btnSub"
     Click="btnSub_Click" />
     </telerik:RadRibbonGroup>
     
     <telerik:RadRibbonGroup Name="ribbonGroup3"
     Header="Rad Ribbon Mul"
     HorizontalAlignment="Center">
     
     <telerik:RadRibbonButton Content="Multiplication"
     Name="btnMul"
     Click="btnMul_Click"/>
     </telerik:RadRibbonGroup>
     
     <telerik:RadRibbonGroup Name="ribbonGroup4"
     Header="Rad Ribbon Div" >
     
     <telerik:RadRibbonButton Content="Division"
     Name="btnDiv"
     Click="btnDiv_Click" />
     </telerik:RadRibbonGroup>
     </telerik:RadRibbonTab>
     </telerik:RadRibbonView>
     
    <TextBlock Grid.Row="1"
     Height="23"
     HorizontalAlignment="Left"
     Margin="72,61,0,0"
     Name="textBlock1"
     FontFamily="Verdana"
     FontSize="15"
     Text="Please Enter First Number: "
     VerticalAlignment="Top"
     Width="214" />
     
     <TextBox Grid.Row="1"
     Height="23"
     HorizontalAlignment="Left"
     Margin="320,60,0,0"
     Name="textBox1"
     VerticalAlignment="Top"
     Width="120" />
     
     <TextBlock Grid.Row="1"
     Height="23"
     HorizontalAlignment="Left"
     Margin="58,121,0,0"
     FontFamily="Verdana"
     FontSize="15"
     Name="textBlock2"
     Text="Please Enter Second Number: "
     VerticalAlignment="Top"
     Width="228" />
     
     <TextBox Grid.Row="1"
     Height="23"
     HorizontalAlignment="Left"
     Margin="320,120,0,0"
     Name="textBox2"
     VerticalAlignment="Top"
     Width="120" />
     
     </Grid>


    Thanks,
    Vijay
  8. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 03 Jan 2013 Link to this post

    Hello Vijay,

    Thank you for writing.

    Please note that this thread belongs to the WinForms forum while your question seems to the related to our WPF/Silverlight tools. If so, please address your question to the appropriate forums: http://www.telerik.com/community/forums/wpf.aspx.

    All the best,
    Boryana
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top
UI for WinForms is Visual Studio 2017 Ready