Telerik Forums
UI for WPF Forum
2 answers
306 views

Hello,

Is it possible to achieve this like on the attached file ?

Thanks in advance.

Regards.

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Mar 2018
5 answers
919 views
I am trying to bind a dynamically generated menu. I have set up the following style:


<
Style x:Key="MenuItemStyle" TargetType="telerik:RadMenuItem">
        <Setter Property="Header" Value="{Binding Header}" />
        <Setter Property="IsCheckable" Value="{Binding IsCheckable}" />
         
        <Setter Property="IsSeparator" Value="{Binding IsSeparator}" />
        <Setter Property="IsChecked" Value="{Binding IsChecked}" />
        <Setter Property="Icon" Value="{Binding IconUrl}" />
         
        <Setter Property="ItemsSource" Value="{Binding SubMenuItems}" />
        <Setter Property="Command" Value="{Binding MenuItemClicked}" />
        <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}" />
      
        <Setter Property="IconTemplate" >
            <Setter.Value>
                <DataTemplate>
                    <Image Source="{Binding}" Stretch="Fill"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
 
    </Style>
</Window.Resources>
This Generates the menus just fine and they appear exactly as I expect HOWEVER the command does nothing ()i.e. the MENUCLICKED. I have set up the command MenuItemClicked in the ViewModel and correct instantiated it as an ICOMMAND but it never fires the command. What am I missing??. The command is set up as follows:
public ICommand MenuItemClicked { get; set; }
 
MenuItemClicked = new Command<RadMenuItem>(c =>
          {
              ....executesomeciodec);
          });
 I must have missed something but for the life of me I cannot see what. I know it is bound correctly as the menus are getting populated with the correct properties, icons and layouts.

Please advise - thank you



Vladimir Stoyanov
Telerik team
 answered on 14 Feb 2018
2 answers
486 views

The snippet below is from an application for a machine shop which has a rather utilitarian menu.... I've been asked to add hot keys to some of the items; one of the menu items (as seen in the code below) I need to add the F6 key as a hotkey (note the idendical Command for clicking vs hotkey)...   clicking on it works as desired, but the hotkey has seemingly no effect whatsoever.

 

What am I missing, or otherwise doing wrong? Thanks in advance for your help.

 

        <telerik:RadMenuItem Name="ToolsMenu" Header="Tools">
            <telerik:RadMenuItem Name="ToolsUseFinishLocationMenuItem" Header="Use Finish Location For Bin" Command="{Binding ToolsUseFinishLocationForBinCommand}" InputGestureText="F6">
                <telerik:RadMenuItem.InputBindings>
                    <KeyBinding Key="F6" Command="{Binding ToolsUseFinishLocationForBinCommand}" />
                </telerik:RadMenuItem.InputBindings>
            </telerik:RadMenuItem>
        </telerik:RadMenuItem>

Tayyaba
Top achievements
Rank 1
 answered on 07 Feb 2018
3 answers
249 views
Hi,

I want to display list of all open windows in "Windows" RadMenu  at dynamically  and if I close any window then it should be removed from the "Windows" menu.
And I also want, menu should be check which window is top most.

Any help will be much more appreciated.

Regards,
Bharat Mendapara
Kalin
Telerik team
 answered on 18 Jan 2018
7 answers
216 views
When using the keyboard to traverse a GUI's components, a RadMenu gets highlighted the first time it receives keyboard focus but never loses the highlight when the focus goes to the next item.

Example:
- Add the following to a simple GUI:
  1. two buttons
  2. one RadMenu

- Run the application
- Tab around the controls
- Notice how the buttons change visual status when they receive and lose keyboard focus.
- Notice how the menu turns orange the first time it receives keyboard focus and then never changes visual state again as it receives/loses focus.
 
  I have tried resetting background color in the LostKeyboardFocus Event on the RadMenu and its topmost RadMenuItem but that doesn't work.

  How can I get a RadMenu to correctly display visual feedback as it receives/loses keyboard focus?


Nayana
Top achievements
Rank 1
 answered on 31 Oct 2017
4 answers
377 views

Hello

 

When I set DropDownPlacement = "Left", the MenuItem sometimes opens to the left, sometimes to the right.
If I set DropDownPlacement = "Right" the same game - the MenuItem opens sometimes left, sometimes right.

 

<telerik:RadMenu x:Name="topmenu" Grid.Row="0" Grid.ColumnSpan="4" IconColumnWidth="0" VerticalAlignment="Top" HorizontalAlignment="Stretch">
            <telerik:RadMenuItem Header="Allgemein" DropDownPlacement="Bottom">
                <telerik:RadMenuItem Header="Beenden" Command="{Binding ExitApplicationCommand}"/>
                <telerik:RadMenuItem Header="Info" Command="{Binding InfoCommand}"/>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Header="Protokolle" Command="{Binding OpenChangeProtocolViewCommand}"/>
 
            <telerik:RadMenuItem DataContext="{Binding MenuDocuments}" ItemsSource="{Binding ChildMenuItems, UpdateSourceTrigger=PropertyChanged}"
                                 Header="{Binding Header, UpdateSourceTrigger=PropertyChanged}" StaysOpenOnClick="True"
                                 DropDownPlacement="Left">
                <telerik:RadMenuItem.Resources>
                    <HierarchicalDataTemplate DataType="{x:Type local:MenuItemViewModel}" ItemsSource="{Binding ChildMenuItems, UpdateSourceTrigger=PropertyChanged}">
                        <telerik:RadMenuItem Header="{Binding Header, UpdateSourceTrigger=PropertyChanged}"
                                             Command="{Binding ExecuteCommand}" StaysOpenOnClick="True"
                                             DropDownPlacement="Left">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="MouseEnter" >
                                    <i:InvokeCommandAction Command="{Binding MouseEnterCommand}" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </telerik:RadMenuItem>
                    </HierarchicalDataTemplate>
                </telerik:RadMenuItem.Resources>
            </telerik:RadMenuItem>
        </telerik:RadMenu>

 

We would like, that all menuitem always open on the left site from parent menu.

Is this possible with the RadMenu Control?

For what purpose is the setting DropDownPlacement?

 

Thank you

Birgit
Top achievements
Rank 1
 answered on 17 Jul 2017
4 answers
138 views

Hello Telerik Team,

                              I have one problem in my WPF project. I was getting issues when we select more than 6000 documents from radgridview after select these documents i was selecting 1 documents . so it was taking near about 45 seconds time to select the single document. so from telerik team someone suggested to update the telerik versions with the newer one. after upgradation all the radmenuitems were not working and some UI things also not working,i have attached the snapshots of the radmenuitems. what i have to do for it to fix these issues.

 

Regards

Raju Tiwari

Stefan
Telerik team
 answered on 28 Jun 2017
2 answers
163 views

Hi,

the vertical alignment of InputGestureText in Office2016 Theme is faulty. In VisualStudio2013 Theme everthing is fine.

How can i correct this?

Thanks!

Philipp
Top achievements
Rank 1
 answered on 12 May 2017
2 answers
268 views

Hello,

I have a very simple piece of code to bind my RadMenu control to an ObservableList of Menus.

My xaml looks like this:

<telerik:RadMenu Name:"MainMenu" ItemsSource="{Binding Menus}"/>

This works fine. In order to display something more interesting, I can add:

<telerik:RadMenu Name:"MainMenu" ItemsSource="{Binding Menus}" DisplayMemberPath="Name" />

And I get the Name property of my Menus displayed.

Now I would like to get a step further as my Menu class has a SubMenus property so I try to play with RadMenuItem styling and this is where I get lost.

If I write simple code like this, that according to me should do the same as the DisplayMemberPath :

<telerik:RadMenu Name:"MainMenu" ItemsSource="{Binding Menus}" >

      <telerik:RadMenu.Resources>

            <Style TargetType="telerik:RadMenuItem">

                    <Setter Property="Header" Value="{Binding Name}"/>

            </Style>

       </telerik:RadMenu.Resources>

</telerik:RadMenu>

Nothing is displayed on my window when running the code. 

I have checked everything, I can see in my view that the Menu is created and the items inside, etc... but the RadMenus don't display.

As soon as I comment out the Style, menus are displayed. As everything else is straightforward in my code, I think I am missing something obvious but I can't find it. There is no error in debug for binding issues or else.

I use Telerik 2017.1.22.45.

Thanks for your feedback.

Alexandre
Top achievements
Rank 1
 answered on 04 May 2017
3 answers
377 views
Hi All

  I am Using Rad Menu. Basically i am created 3 menu items like File View and Users
where as User menu item i have binded submenu from database. how to add click event for that submenus.
how can acheive that .
Thanks
G Dinakaran
Tim
Top achievements
Rank 1
 answered on 26 Mar 2017
Narrow your results
Selected tags
Tags
+112 more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?