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

MenuItem in ToolBar

2 Answers 48 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Ivo
Top achievements
Rank 1
Ivo asked on 07 Jan 2019, 11:08 AM

Hi, i want to have also "MenuItem" in ToolBar besides normal Buttons. I achieved to do it, but the MenuItem is never opened. Is it necessary to do something more. Or is there any other short way to implement this behavior?

Here it is my xaml

      <telerik:RadToolBar x:Name="toolBar" FocusManager.IsFocusScope="False" HorizontalAlignment="Stretch" Margin="-1 -2 -1 0" BorderBrush="{StaticResource W Grey}" AutoHideOverflowButton="True">
        <telerik:RadButton Margin="2" Command="{Binding LoginCommand}" Content="Login" />
        <telerik:RadButton Margin="2" Command="{Binding LogoutCommand}" Content="Logout" />
        <telerik:RadMenuItem Margin="2">
          <telerik:RadMenuItem Margin="2"  Header="Online Change Compile" Command="{Binding OnlineChangeCompileCommand}">
            <Image Source="../Resources/Images/Toolbar/Icons.16x16.OnlineChangeCompile.png" Stretch="None" />
          </telerik:RadMenuItem>
          <telerik:RadMenuItem Margin="2" Header="Full Compile" Command="{Binding FullCompileCommand}">
            <Image Source="../Resources/Images/ToolBar/Icons.16x16.FullCompile.png" Stretch="None" />
          </telerik:RadMenuItem>
          <telerik:RadMenuItem Margin="2" Header="Full Deploy" Command="{Binding FullDeployCommand}" />
          <telerik:RadMenuItem Margin="2" Header="Online Change Deploy" Command="{Binding OnlineChangeDeployCommand}" />
          <telerik:RadMenuItem.Header>
            <StackPanel Orientation="Horizontal">
              <Image Margin="0" Source="../Resources/Images/Icons.16x16.OpenContextMenu.png" Stretch="None"  Height="16" Width="16" Visibility="{Binding OpenContextMenuVisibility}"/>
              <TextBlock Text="Action" />
            </StackPanel>
          </telerik:RadMenuItem.Header>
        </telerik:RadMenuItem>
      </telerik:RadToolBar>

 

Thanks, Ivo

2 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 08 Jan 2019, 02:03 PM
Hello Ivo,

Thank you for the provided code snippet.

Please, note that the RadMenuItems are designed to work with the RadMenu control. Can you try placing the RadMenuItems inside a RadMenu?

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ivo
Top achievements
Rank 1
answered on 09 Jan 2019, 10:30 AM
Yes i added RadMenu To Toolbar ... thanks
Tags
ToolBar
Asked by
Ivo
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Ivo
Top achievements
Rank 1
Share this question
or