iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I get this error (see attached) when I try and use context menu and how to I use with MVVM - can I simply use Command={Binding DoSomething} - thanks
<Intersoft:UXContextMenu x:Name="SampleControl1"> <Intersoft:UXMenuItem Header="Edit" /> <Intersoft:UXMenuItem Header="Delete" /> </Intersoft:UXContextMenu> <Intersoft:UXGridView Name="MainGrid" Margin="0,0,0,5" AutoGenerateColumns="False" CanUserGroupColumns="True" CheckedItems="{Binding CheckedItems, Mode=TwoWay}" CanUserPage="True" GridLinesVisibility="Horizontal" Intersoft:ContextMenuService.ContextMenu="SampleControl1" GroupByBoxVisibility="{Binding GroupByBoxVisibility, Converter={StaticResource VisibilityConverter}}" IsBusy="{Binding IsBusy, Mode=TwoWay}" ItemsSource="{Binding Path=GridList, Mode=TwoWay}" IsTabStop="False" PageSize="{Binding PageSize, Mode=TwoWay}" SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" SelectedIndex="{Binding SelectedIndex,Mode=TwoWay}" Intersoft:DockPanel.IsFillElement="True" CanUserExport="True" AutoEditOperation="False" AlternatingRowBackground="{x:Null}" Background="White">
Thank you for your recent inquiry regarding UXContextMenu.
Could you please provide more information about your scenario? From the given snippet code, it seems that you are trying to attach the UXContextMenu control to UXGridView. As you may know, UXGridView already has their own built-in context menu. I’d like to suggest you to modify the built-in context menu of UXGrid for your required scenario.
can I simply use Command={Binding DoSomething}
The item container type of UXContextMenu is UXMenuItem. UXMenuItem implements both ICommandSource and INavigationSource to support commanding and navigation, which is shown in the following snippet code.
<Grid x:Name="LayoutRoot" Background="White" Intersoft:ContextMenuService.ContextMenu="{Binding ElementName=ContextMenu1}"> <Grid.DataContext> <vm:MainPageViewModel /> </Grid.DataContext> <Intersoft:UXContextMenu x:Name="ContextMenu1" HorizontalAlignment="Left" VerticalAlignment="Top"> <Intersoft:UXMenuItem Header="Sort By"> <Intersoft:UXMenuItem Header="Name" Command="{Binding SortCommand}" CommandParameter="Name"/> <Intersoft:UXMenuItem Header="Type" Command="{Binding SortCommand}" CommandParameter="Type"/> <Intersoft:UXMenuItem Header="Size" Command="{Binding SortCommand}" CommandParameter="Size"/> </Intersoft:UXMenuItem> <Intersoft:UXMenuItem Header="Properties"/> <Intersoft:UXMenuItem Header="About Us" NavigateUri="www.mywebsite.com" TargetName="_blank"/> </Intersoft:UXContextMenu> </Grid>
You can do commanding through Command, CommandTarget, and CommandParameter properties and navigation.
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname