This question is locked. New answers and comments are not allowed.
Hi,
I'm using the toolbar control do define a toolbar on top of a control.
I'm defining the toolbar on the generic.xaml because the the control I'm developing needs to have "content":
If I try to add a MenuItem, to a menu item (a sub-menu), I'm always getting one of those errors AG_....
In your example you do that, is this not possible if I define this on generic.xaml?
Thanks,
L. Pinho
I'm using the toolbar control do define a toolbar on top of a control.
I'm defining the toolbar on the generic.xaml because the the control I'm developing needs to have "content":
| <Style TargetType="local:GridToolbar"> |
| <Setter Property="Template"> |
| <Setter.Value> |
| <ControlTemplate TargetType="local:GridToolbar"> |
| <Grid> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="Auto"></RowDefinition> |
| <RowDefinition Height="Auto"></RowDefinition> |
| </Grid.RowDefinitions> |
| <!-- This the header. --> |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="25"/> |
| <RowDefinition Height="Auto"/> |
| </Grid.RowDefinitions> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="Auto" /> |
| <ColumnDefinition Width="*"/> |
| </Grid.ColumnDefinitions> |
| <TextBlock Grid.Column="0" Grid.Row="0" x:Name="txtLabel" VerticalAlignment="Center" Margin="3" FontWeight="Bold" /> |
| <telerikNavigation:RadToolBar Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right"> |
| <telerikNavigation:RadMenuItem x:Name="menuItemAdd" Width="25" > |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgAdd" Source="/AssemblyName;component/Images/add-16x16.png" Width="16" Height="16" /> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadMenuItem x:Name="menuItemDelete" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgDelete" Source="/AssemblyName;component/Images/delete-16x16.png" Width="16" Height="16"/> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadSeparator x:Name="menuItemSeparatorLeft"/> |
| <telerikNavigation:RadMenuItem x:Name="menuItemExport" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgExport" Source="/AssemblyName;component/Images/export-16x16.png" Width="16" Height="16"/> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadMenuItem x:Name="menuItemFavorites" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgFavorites" Source="/AssemblyName;component/Images/Favorites-16x16.png" Width="16" Height="16"/> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadMenuItem x:Name="menuItemEdit" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgEdit" Source="/AssemblyName;component/Images/edit-16x16.png" Width="16" Height="16"/> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadSeparator x:Name="menuItemSeparatorRight"/> |
| <telerikNavigation:RadMenuItem x:Name="menuItemRefresh" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgRefresh" Source="/AssemblyName;component/Images/refresh-16x16.png" Width="16" Height="16"/> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| <telerikNavigation:RadMenuItem x:Name="menuItemExecute" Width="25"> |
| <telerikNavigation:RadMenuItem.Icon> |
| <Image x:Name="imgExecute" Source="/AssemblyName;component/Images/simplistica/16x16/accept.png" Width="16" Height="16" /> |
| </telerikNavigation:RadMenuItem.Icon> |
| </telerikNavigation:RadMenuItem> |
| </telerikNavigation:RadToolBar> |
| </Grid> |
| <!-- This is the content. --> |
| <ContentPresenter Grid.Row="1" x:Name="Content" Content="{TemplateBinding Content}" Height="Auto" Width="Auto"/> |
| </Grid> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
If I try to add a MenuItem, to a menu item (a sub-menu), I'm always getting one of those errors AG_....
In your example you do that, is this not possible if I define this on generic.xaml?
Thanks,
L. Pinho