<
telerik:RadToolBarTray
telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled
=
"True"
ItemsSource
=
"{Binding MergedToolbarCommands}"
x:Name
=
"ToolbarTray"
>
<
telerik:RadToolBarTray.ItemTemplate
>
<
DataTemplate
>
<
telerik:RadToolBar
ItemsSource
=
"{Binding}"
OverflowMode
=
"AsNeeded"
>
<
telerik:RadToolBar.ItemContainerStyle
>
<
Style
TargetType
=
"{x:Type ContentPresenter}"
>
<
Setter
Property
=
"ToolBar.OverflowMode"
Value
=
"Never"
/>
</
Style
>
</
telerik:RadToolBar.ItemContainerStyle
>
</
telerik:RadToolBar
>
</
DataTemplate
>
</
telerik:RadToolBarTray.ItemTemplate
>
</
telerik:RadToolBarTray
>
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
Hi Guys,
is it somehow possible to override the "IsChecked" style of a RadToggleButton within the RadToolBar?
I would like to have a "working"-spinner animation when a button is pressed.
Thank you very much.
<telerik:RadToolBar x:Class="ToolBarTest.View.ToolBars.StandardToolbarView" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Controls="clr-namespace:ToolBarTest.Controls" > <telerik:RadToolBar.Resources> <Style x:Key="Refresh" TargetType="telerik:RadButton"> <Setter Property="ToolTip" Value="Refresh Set Via Property"/> </Style> </telerik:RadToolBar.Resources> <telerik:RadButton x:Name="Refresh" Style="{StaticResource Refresh}" Controls:ImageContentSetter.Source="/ToolBarTest;component/Images/document_refresh.png" /> </telerik:RadToolBar>
<telerik:RadToolBar x:Class="ToolBarTest.View.ToolBars.StandardToolbarView" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Controls="clr-namespace:ToolBarTest.Controls" > <telerik:RadToolBar.Resources> <Style x:Key="Refresh" TargetType="telerik:RadButton"> </Style> </telerik:RadToolBar.Resources> <telerik:RadButton x:Name="Refresh" Style="{StaticResource Refresh}" Controls:ImageContentSetter.Source="/ToolBarTest;component/Images/document_refresh.png" ToolTip="Refresh" /> </telerik:RadToolBar>
Referencing to the sample projects of RadToolBar provided here:
https://github.com/telerik/xaml-sdk/tree/master/ToolBar
There's no option to set the mouse cursor to SizeAll when mouse is over the grip visual area.
I have attached a screenshot of my visual studio project where although I have basically copied your toolbar example the 2 buttons are showing vertically and not horizontally. Any ideas what's wrong?
Using 2017.1.222.45
<ToolBarTray DockPanel.Dock="Top" |
IsLocked="False"> |
<ToolBar BandIndex="0" |
ToolBarTray.IsLocked="False"> |
<Button Click="Button_Click">foo</Button> |
</ToolBar> |
<ToolBar BandIndex="0" |
ToolBarTray.IsLocked="False"> |
<Button Command="ApplicationCommands.Cut" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
<Button Command="ApplicationCommands.Copy" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
<Button Command="ApplicationCommands.Paste" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
</ToolBar> |
</ToolBarTray> |
<telerik:RadToolBarTray DockPanel.Dock="Top" |
IsLocked="False"> |
<telerik:RadToolBar BandIndex="0" |
telerik:RadToolBarTray.IsLocked="False"> |
<Button Click="Button_Click">foo</Button> |
</telerik:RadToolBar> |
<telerik:RadToolBar BandIndex="0" |
telerik:RadToolBarTray.IsLocked="False"> |
<Button Command="ApplicationCommands.Cut" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
<Button Command="ApplicationCommands.Copy" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
<Button Command="ApplicationCommands.Paste" |
Content="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" |
HorizontalAlignment="Center" |
VerticalAlignment="Center" /> |
</telerik:RadToolBar> |
</telerik:RadToolBarTray> |
I'm using a RadToolBar in an Excel task pane. When the task pane is sized to move controls to the overflow, the overflow button will enable but clicking the overflow button will not display the controls. I've further narrowed the problem to when the WPF user control is converted to an INativeControlHandle and back before adding it to the task pane.
I've built a sample project to demonstrate the problem. The sample also includes a regular WPF ToolBar which does not have the same problem. (remove the .jpg extension from the .zip file)
Note that the same code hosted in a Word addin will function correctly as will a generic WinForms application.
Any advice would be appreciated.