This question is locked. New answers and comments are not allowed.
I have a ribbon looking like this:
And I populate it like this:
The TextBlock content doesn't display near its parent drop down button, but at {0,0} of the window...
I've attached a pic of what I see. Is this something I'm doing wrong or is there a workaround?
Thanks -
<UserControl x:Class="q_telerik2.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <telerik:RadRibbonView> <telerik:RadRibbonTab> <telerik:RadRibbonGroup> <telerik:RadRibbonDropDownButton Name="ribbonButton" DropDownOpening="RadRibbonDropDownButton_DropDownOpening" Content="Click Me"> </telerik:RadRibbonDropDownButton> </telerik:RadRibbonGroup> </telerik:RadRibbonTab> </telerik:RadRibbonView> </Grid></UserControl>
And I populate it like this:
private void RadRibbonDropDownButton_DropDownOpening(object sender, RoutedEventArgs e){ StackPanel sp = new StackPanel(); for (int i = 1; i < 5; i++) { RadDropDownButton childButton = new RadDropDownButton() { Content = "Choice " + i.ToString() }; sp.Children.Add(childButton); StackPanel childContent = new StackPanel(); for (int j=1 ; j<5; j++) { TextBlock tb = new TextBlock() { Text = j.ToString() + ". Why do we display up here?" }; childContent.Children.Add(tb); } childButton.DropDownContent = childContent; } ribbonButton.DropDownContent = sp;}The TextBlock content doesn't display near its parent drop down button, but at {0,0} of the window...
I've attached a pic of what I see. Is this something I'm doing wrong or is there a workaround?
Thanks -