Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. (solved) WPF TreeViewItem and Focus

(solved) WPF TreeViewItem and Focus

Scheduled Pinned Locked Moved WPF
csharpwpfcomdockerhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    I have a TreeView with EditableTextBlock in my HierarchicalDataTemplate for the TreeViewItems. Now I have a focus problem.. when I navigate the TreeView with arrow key, the EditableTextBlock don't have Focus so I can't handle F2 (to start editing). And also, I made my EditableTextBlock focusable, and now I have to press the directional arrow twice to change selected node with keyboard arrows... How could I gracefully handle that, i.e. 1. arrow key down to change selected node 2. my EditableTextBlock has default an / or I can capture F2 [EDIT] Nevermind, found a solution! :) Added a property on my EditableTextBlock FrameworkElement FocusableContainer And listening to key event on this container.

    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups