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

Menu item and empty space

2 Answers 57 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 10 Feb 2012, 01:07 PM
Hello Telerik,
I got a small annoyance wit the telerik radmenu, I've defined my own hyierachicaldatatemplate as

<HierarchicalDataTemplate x:Key="MenuItemTemplate" ItemsSource="{Binding Items}">
          <TextBlock Text="{Binding Text}" cal:Message.Attach="[Event PreviewMouseDown] = [Action OpenView($dataContext)]"  cal:Action.TargetWithoutContext="{Binding}" />
      </HierarchicalDataTemplate>

(I use caliburn micro for mvvm pattern)

and I b've defined the radmenu as

<telerik:RadMenu x:Name="MenuList"  ClickToOpen="False"   BorderBrush="Transparent" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource MenuItemTemplate}">
           <telerik:RadMenu.ItemContainerStyle>
              <Style TargetType="telerik:RadMenuItem">
                   
                   <Setter Property="Visibility" Value="{Binding IsVisible,Converter={StaticResource booleanConverter}}"></Setter>
               </Style>
           </telerik:RadMenu.ItemContainerStyle>
           <!--ItemsSource="{Binding Items}" ItemTemplate="{StaticResource MenuItemTemplate}"-->
       </telerik:RadMenu>

The problem I got now is that if I've (as text)

MenuToplevelItem
Voice1    (*)
VoiceLongerThenVoice1

I've to click exacly on Voice 1, if I click where I put (*) it won't call the OpenView() ...same meaning if I click on the left part of the menuitem... it does't work.. how can I style the menuitem in order to a stackpanel/text larger as the largest value?
Thanks

2 Answers, 1 is accepted

Sort by
0
Michele
Top achievements
Rank 2
answered on 13 Feb 2012, 02:59 PM
anyone on this?
0
Konstantina
Telerik team
answered on 16 Feb 2012, 12:45 PM
Hi Paolo,

I am sorry, but I am not sure what might the problem be, the DataTemplate seems to be correct. Could you please prepare a quick sample in which this can be observed. In that way we will be able to run it here locally and track down the source of the problem.

Looking forward to your reply.

Greetings,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Menu
Asked by
Michele
Top achievements
Rank 2
Answers by
Michele
Top achievements
Rank 2
Konstantina
Telerik team
Share this question
or