I'm trying to use the context menu in a listview to run some code that requires data from which item it originated from.
I initially just did this:
XAML:
<ListView x:Name="lvResources" ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListView.Resources>
<ContextMenu x:Key="resourceContextMenu">
<MenuI...
I created a Flex application with a textArea. I'm populating the textArea's htmlText property.
I have a context menu on the textArea, but I don't see how to make a different context menu when the user right clicks on a <a href...>link</a>. Can I control the context menu for a link displayed inside of the htmlText of a mx:TextArea?
...
How do i assign a separate context menu to the column headers of a listview in c#?
...
I'm creating a simple clipboard manager application. It monitors the content of a clipboard. When a change occurs (throu the win api message loop) it fires up a method to capture current content of clipboard and creates new object called clipboarditem. Next its building a ContextMeuStrip which consits of several clipboarditems created pr...
I am inserting TreeViewItems into a TreeView control and setting the style for each at the time of insertion. I am assigning different styles (predefined in XAML), depending on the type of node (TreeViewItem) I want to insert. Some of the styles include a ContextMenu.
My problem is that I am unable to use Click="MyHandler" on the MenuI...
I have a ContextMenu with a MenuItem in it:
<Grid>
<Button Content="{Binding Test}">
<Button.ContextMenu>
<ContextMenu>
<StackPanel>
<MenuItem Header="{Binding Test}"/>
</StackPanel>
</ContextMenu>
</Button.ContextMenu>
</Button>
</Grid>
...
I added a context menu (add, cancel) to tree view dynamically. Now I want to show the selected tree node value when I click on context menu item click.
How can I do that?
...
Simple question here: what does the StaysOpen property of the ContextMenu (or equivalently Popup) control actually do? I have tried observing the difference in behaviour, but I notice none whatsoever.
MSDN states the following:
true if the menu should stay open until the IsOpen property changes to false; otherwise, false. The defau...
I have a WPF ListView control with a ContextMenu written in XAML Code. With every right-click on the ListView the ContextMenu is shown even when there are no items in the ListView.
This is a behavior I don't want. The ContextMenu should only open if there are items in the ListView. I have no problem counting the items but I don't find t...
<Button Name="btnFoo" Content="Foo" >
<Button.ContextMenu Placement="Bottom" PlacementTarget="btnFoo">
<MenuItem Header="Bar" />
</Button.ContextMenu>
</Button>
gives me a runtime error 'UIElement' type does not have a public TypeConverter class
I also tried
<Button Name="btnFoo" Content="Foo" >
<Button.ContextMen...
Hi
I have a MenuItem that contains all files in a spesific folder.
The menuitem is populated on its own Popup event (using System.IO.Directory.GetFiles), but if it is too close to the lower right corner of the screen (or so it seems), it will jump higher up on the screen while being populated.
If I populate it before the Popup event i...
I'm writing a C# (.NET 3.5) app with a usercontrol that inherits from DataGridView. When the user right-clicks a column header, I want to display a context menu.
I've actually got this working find on 2 forms in my app. I'm stumped because the ContextMenu won't show on the same control on a third form. I do see that the Popup event gets...
Hi I added a context menu on label (c#, winforms). my context menu having 3 child items and i want to display label text when i click on any one of context menu items.
thanks in advance
...
Hi All,
Seeing how Notepad++ does this, is it possible to achieve something like this:
http://i28.tinypic.com/fm2gs6.png
using Registry class?
Pointers in the right direction would be highly appreciated.
Have it working great without icon now. :)
i31.tinypic.com/ekokgi.png
I think registering icon is going to be harder.
Thank...
I've got a datagrid column as below:
<toolkit:DataGridTemplateColumn>
<toolkit:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=LabelName}" Background="{Binding Path=Color}">
<TextBloc...
There is an event which is dispatched when the context menu (right click menu) in actionscript for flash has been opened:
ContextMenuEvent.MENU_SELECT
Now, is there an event which is dispatched when the menu has been closed?
...
Hello!
First take a look at my code:
<ListBox ItemsSource="{Binding}" SelectionMode="Multiple"
ItemTemplate="{StaticResource ContactTemplate}">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Name="mnuEdit" Header="_Edit" Click="MenuItem_Click" />
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
...
I have a ListView GridView with ListViewItems that represent different categories of items. I'd like to display a different ContextMenu for each category of item. I was hoping to do this using DataTemplates but I'm struggling. My TreeView has a DataTemplate per category and I can see how I can set a different ContextMenu for each ther...
I am trying to achieve the following:
<Style TargetType="ListBoxItem">
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Name="mnuEdit" Header="_Edit" Click="MenuItem_Click" />
</ContextMenu>
</Setter.Value>
</Setter>
<Style>
But it throws the followi...
In XAML, how do you define a context menu for treeviewitems that are distinguished by different attributes?
...