Click here to Skip to main content
15,909,325 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Interesting WPF Info Pin
Pete O'Hanlon29-Aug-08 0:55
mvePete O'Hanlon29-Aug-08 0:55 
GeneralRe: Interesting WPF Info Pin
Jammer29-Aug-08 1:52
Jammer29-Aug-08 1:52 
QuestionHow to enable Context menu for a listbox item. Pin
Aslesh28-Aug-08 17:31
Aslesh28-Aug-08 17:31 
AnswerRe: How to enable Context menu for a listbox item. Pin
User 27100931-Aug-08 16:18
User 27100931-Aug-08 16:18 
GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh31-Aug-08 20:04
Aslesh31-Aug-08 20:04 
GeneralRe: How to enable Context menu for a listbox item. Pin
User 2710091-Sep-08 5:35
User 2710091-Sep-08 5:35 
GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh1-Sep-08 5:49
Aslesh1-Sep-08 5:49 
AnswerRe: How to enable Context menu for a listbox item. [modified] Pin
Pete O'Hanlon1-Sep-08 9:45
mvePete O'Hanlon1-Sep-08 9:45 
I hope that this helps:
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns: d="http://schemas.microsoft.com/expression/blend/2006" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  mc:Ignorable="d"
  x:Class="ListViewContextSample.Window1"
  x:Name="Window"
  Title="Window1"
  Width="640" Height="480">

  <Window.Resources>
    <XmlDataProvider x:Key="WPFRSSFeed" d:IsDataSource="True" 
        Source="http://www.codeproject.com/WebServices/MessageRSS.aspx?fid=1004114"/>
    <DataTemplate x:Key="itemTemplate">
      <StackPanel>
        <TextBlock Text="{Binding Mode=OneWay, XPath=title}"/>
        <TextBlock Text="{Binding Mode=OneWay, XPath=description}"/>
        <TextBlock Text="{Binding Mode=OneWay, XPath=link}"/>
        <TextBlock Text="{Binding Mode=OneWay, XPath=author}"/>
        <TextBlock Text="{Binding Mode=OneWay, XPath=pubDate}"/>
        <TextBlock Text="{Binding Mode=OneWay, XPath=subject}"/>
      </StackPanel>
    </DataTemplate>
  </Window.Resources>

  <StackPanel x:Name="LayoutRoot">
    <ScrollViewer IsTabStop="True" >
      <ItemsControl ItemTemplate="{DynamicResource itemTemplate}" 
        ItemsSource="{Binding Mode=Default, Source={StaticResource WPFRSSFeed}, 
        XPath=/rss/channel/item}">
        <ItemsControl.ContextMenu>
          <ContextMenu Name="MyContextMenu">
            <MenuItem Header="This is my menu" />
          </ContextMenu>
        </ItemsControl.ContextMenu>
      </ItemsControl>
    </ScrollViewer>
  </StackPanel>
</Window>


Deja View - the feeling that you've seen this post before.

My blog | My articles



modified on Tuesday, September 2, 2008 5:05 AM

GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh2-Sep-08 10:20
Aslesh2-Sep-08 10:20 
GeneralRe: How to enable Context menu for a listbox item. Pin
Pete O'Hanlon2-Sep-08 10:25
mvePete O'Hanlon2-Sep-08 10:25 
GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh2-Sep-08 10:35
Aslesh2-Sep-08 10:35 
GeneralRe: How to enable Context menu for a listbox item. Pin
Pete O'Hanlon2-Sep-08 10:49
mvePete O'Hanlon2-Sep-08 10:49 
GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh2-Sep-08 11:23
Aslesh2-Sep-08 11:23 
GeneralRe: How to enable Context menu for a listbox item. Pin
Pete O'Hanlon2-Sep-08 11:32
mvePete O'Hanlon2-Sep-08 11:32 
GeneralRe: How to enable Context menu for a listbox item. Pin
Aslesh3-Sep-08 7:57
Aslesh3-Sep-08 7:57 
QuestionResources in WPF Pin
ciacia28-Aug-08 2:41
ciacia28-Aug-08 2:41 
AnswerRe: Resources in WPF Pin
User 27100928-Aug-08 4:18
User 27100928-Aug-08 4:18 
GeneralRe: Resources in WPF Pin
Jammer28-Aug-08 6:48
Jammer28-Aug-08 6:48 
GeneralRe: Resources in WPF Pin
Pete O'Hanlon28-Aug-08 8:15
mvePete O'Hanlon28-Aug-08 8:15 
GeneralRe: Resources in WPF Pin
User 27100928-Aug-08 15:27
User 27100928-Aug-08 15:27 
GeneralRe: Resources in WPF Pin
Jammer28-Aug-08 22:37
Jammer28-Aug-08 22:37 
GeneralRe: Resources in WPF Pin
User 27100929-Aug-08 3:50
User 27100929-Aug-08 3:50 
GeneralRe: Resources in WPF Pin
Pete O'Hanlon29-Aug-08 4:06
mvePete O'Hanlon29-Aug-08 4:06 
GeneralRe: Resources in WPF Pin
User 27100929-Aug-08 4:08
User 27100929-Aug-08 4:08 
GeneralRe: Resources in WPF Pin
Pete O'Hanlon29-Aug-08 4:30
mvePete O'Hanlon29-Aug-08 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.