Dynamic Loading of Usercontrol

2 posts, 0 answers
  1. Arun
    Arun avatar
    6 posts
    Member since:
    Sep 2014

    Posted 03 Nov 2014 Link to this post

    I am using RadRibbon view.In my Ribbonview some tabs are there.When Click on a tab a usercontrol will load dynamically.Inside this tab there is a ribbon group with abutton.When click this button in the group I trying to visible a panel in the usercontrol.But I didn't get the panel from the group button click.Can anyone help?

    Thankd in advance

    Here is my code

     <telerik:RadRibbonTab x:Name="rtbDevice" Cursor="Hand" Header="Devices" FontFamily="Arial" FontWeight="Bold" Margin="0,1,0,0" >
                   <telerik:RadRibbonGroup  Header="Actions" FontWeight="Normal" Margin="0,0,0,-3" Height="95" VerticalAlignment="Top" Width="192" DataContext="DeviceViewModel">

                       <telerik:RadRibbonButton LargeImage="/Images/add-user.png"  Name="btnAddNewDevice" Command="{Binding ElementName=uctrlDeviceList, Path=DataContext.ShowPanelCmd}" 
                                               Size="Large" Text="New" Width="70" Cursor="Hand"
                       <StackPanel Margin="0,0,0,-5">
                           <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium"  
                                               SmallImage="/Images/Edit.png" Cursor="Hand"
                                               telerik:ScreenTip.Description="Select  datagrid row  and click edit"
                                               telerik:ScreenTip.Title="Edit" Command="{Binding EditDeviceCommand}" 
                                               Text="Edit" Height="19" />
                           <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" Margin="0,4,0,0"
                            SmallImage="/Images/Duplicate.png" Cursor="Hand" 
                            telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard."
                            Text="Duplicate" Height="22" />
                           <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" Margin="0,5,0,0" 
                                               SmallImage="/Images/Delete.png" Cursor="Hand" 
                                               telerik:ScreenTip.Description="Copy formatting from one place and apply it to another.Double-click this button to apply the same formatting to multiple places in the document."
                                               Text="Delete" RenderTransformOrigin="0.452,0.909" Height="13" />

  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1237 posts

    Posted 05 Nov 2014 Link to this post


    I am not sure that I completely understand your scenario. Could you please elaborate more on where this UserControl is loaded? Is it loaded inside the RadRibbonTab or somewhere else in your application? How exactly is it loaded? What is the relation between the RadRibbonView control and your UserControl?

    Pavel R. Pavlov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top