Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

RadListBox - ContextMenu for an item

$
0
0

Thanks for the answer :)

Now the context menu is only on the items (as i want)

but i didn't reach my "command" code in my viewModel. 

this is my code after your help:

<usercontrol.Resources>
     <telerik:RadContextMenu x:Key="menu">
            <telerik:RadMenuItem Header="This menu is only for item" x:Name="radMenuItem"
                                 Command="{Binding c}" CommandParameter="{Binding selectedItem}"/>
     </telerik:RadContextMenu>
      <Style TargetType="telerik:RadListBoxItem" x:Key="itemStyle">
           <Setter Property="telerik:RadContextMenu.ContextMenu" Value="{StaticResource menu}"/>
     </Style>
</usercontrol.Resources>

<Grid>

<telerik:RadListBox
           ItemSource ="{Binding collection}" , SelectedItem="{Binding SelectedItem2, mode =TwoWay}"

           ItemContainerStyle="{StaticResource itemStyle}" 

</Grid>


Viewing all articles
Browse latest Browse all 78072

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>