Click here to Skip to main content
15,887,474 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Searching for a common base class for StackPanel and Control Pin
Abhinav S23-Jun-11 23:44
Abhinav S23-Jun-11 23:44 
AnswerRe: Searching for a common base class for StackPanel and Control Pin
Mark Salsbery24-Jun-11 5:58
Mark Salsbery24-Jun-11 5:58 
QuestionWPF MVVM ListBox Basics Pin
Member 450279423-Jun-11 2:13
Member 450279423-Jun-11 2:13 
AnswerRe: WPF MVVM ListBox Basics Pin
SledgeHammer0123-Jun-11 9:55
SledgeHammer0123-Jun-11 9:55 
GeneralRe: WPF MVVM ListBox Basics Pin
Member 450279424-Jun-11 1:36
Member 450279424-Jun-11 1:36 
GeneralRe: WPF MVVM ListBox Basics Pin
SledgeHammer0124-Jun-11 4:59
SledgeHammer0124-Jun-11 4:59 
QuestionMVVM: TreeViewItem double click -> command? Pin
SledgeHammer0122-Jun-11 12:44
SledgeHammer0122-Jun-11 12:44 
AnswerRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon22-Jun-11 17:24
mvePete O'Hanlon22-Jun-11 17:24 
So you have one half of the answer with using the EventToCommand behavior to hook up to the relevant command. The other half depends on how you populate the TreeView - if you use the TreeView.ItemTemplate, then you can attach it in there, e.g.
XML
<TreeView.ItemTemplate>
  <HierarchicalDataTemplate ItemsSource="{Binding Countries}">
    <TextBlock Text="{Binding Name}">
      <i:Interaction.Triggers>
        <i:EventTrigger EventName="MouseDoubleClick">
          <i:InvokeCommandAction CommandName="DoubleClickCommand" CommandParameter="{Binding Name}"/>
        </i:EventTrigger>
      </i:Interaction.Triggers>
    </TextBlock>
  </HierarchicalDataTemplate>
</TreeView.ItemTemplate>

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


GeneralRe: MVVM: TreeViewItem double click -> command? Pin
SledgeHammer0122-Jun-11 17:38
SledgeHammer0122-Jun-11 17:38 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon22-Jun-11 21:09
mvePete O'Hanlon22-Jun-11 21:09 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
SledgeHammer0123-Jun-11 6:49
SledgeHammer0123-Jun-11 6:49 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
SledgeHammer0123-Jun-11 6:57
SledgeHammer0123-Jun-11 6:57 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon23-Jun-11 7:01
mvePete O'Hanlon23-Jun-11 7:01 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
SledgeHammer0123-Jun-11 7:13
SledgeHammer0123-Jun-11 7:13 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon23-Jun-11 7:14
mvePete O'Hanlon23-Jun-11 7:14 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Mycroft Holmes23-Jun-11 12:04
professionalMycroft Holmes23-Jun-11 12:04 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
SledgeHammer0123-Jun-11 12:50
SledgeHammer0123-Jun-11 12:50 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Mycroft Holmes23-Jun-11 14:47
professionalMycroft Holmes23-Jun-11 14:47 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon23-Jun-11 20:20
mvePete O'Hanlon23-Jun-11 20:20 
GeneralRe: MVVM: TreeViewItem double click -> command? Pin
Pete O'Hanlon23-Jun-11 20:19
mvePete O'Hanlon23-Jun-11 20:19 
Questionusing navigation pages in wpf Pin
zooom_921-Jun-11 19:12
zooom_921-Jun-11 19:12 
AnswerRe: using navigation pages in wpf Pin
Pete O'Hanlon21-Jun-11 21:28
mvePete O'Hanlon21-Jun-11 21:28 
QuestionWPF - resource site Pin
Simon_Whale21-Jun-11 11:52
Simon_Whale21-Jun-11 11:52 
AnswerRe: WPF - resource site Pin
Soulus8321-Jun-11 12:53
Soulus8321-Jun-11 12:53 
GeneralRe: WPF - resource site Pin
Pete O'Hanlon21-Jun-11 21:02
mvePete O'Hanlon21-Jun-11 21:02 

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.