CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    Bali, Indonesia
    Posts
    103

    Programmatically set handler [WPF]

    [CODE]

    <TreeView Name="_treeViewMain" TreeViewItem.Selected = "TreeViewItem_Selected">

    /CODE]

    How I can set the Handler of TreeViewItem.Selected programmatically not using the xaml. Because I need to catch The TreeViewItem as the original source.

    Thanks

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Programmatically set handler [WPF]

    Code:
    TreeViewItem.Selected += new RoutedEventHandler(TreeViewItem_Selected);
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured