This is a migrated thread and some comments may be shown as answers.

Dynamic Loading of Usercontrol

1 Answer 90 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 03 Nov 2014, 06:47 AM
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"
                                            
                                            >
                   </telerik:RadRibbonButton>
                   <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."
                        telerik:ScreenTip.Title="Duplicate"
                        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."
                                           telerik:ScreenTip.Title="Delete"
                                           Text="Delete" RenderTransformOrigin="0.452,0.909" Height="13" />
                   </StackPanel>
               </telerik:RadRibbonGroup>

           </telerik:RadRibbonTab>

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 05 Nov 2014, 11:53 AM
Hi,

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?

Regards,
Pavel R. Pavlov
Telerik
 

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.

 
Tags
RibbonView and RibbonWindow
Asked by
Arun
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or