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. Pass selection to container

Pass selection to container

Scheduled Pinned Locked Moved WPF
docker
5 Posts 3 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.
  • M Offline
    M Offline
    Mycroft Holmes
    wrote on last edited by
    #1

    I have a Treeview (telerik) using HierarchicalDataTemplate

    The user MUST select the node BEFORE checking the checkbox. Is it possible to select the node when the user checks the checkbox.

    Never underestimate the power of human stupidity RAH

    S M 2 Replies Last reply
    0
    • M Mycroft Holmes

      I have a Treeview (telerik) using HierarchicalDataTemplate

      The user MUST select the node BEFORE checking the checkbox. Is it possible to select the node when the user checks the checkbox.

      Never underestimate the power of human stupidity RAH

      S Offline
      S Offline
      SledgeHammer01
      wrote on last edited by
      #2

      Yes. Add a trigger to the TreeViewItem that says if IsKeyboardFocusWithin is true, then select the item.

      B M 2 Replies Last reply
      0
      • S SledgeHammer01

        Yes. Add a trigger to the TreeViewItem that says if IsKeyboardFocusWithin is true, then select the item.

        B Offline
        B Offline
        Biswa Pujarini Mohapatra
        wrote on last edited by
        #3

        yes pass a event treeviewitem

        1 Reply Last reply
        0
        • S SledgeHammer01

          Yes. Add a trigger to the TreeViewItem that says if IsKeyboardFocusWithin is true, then select the item.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Thank you that was enough to chase down the detail.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • M Mycroft Holmes

            I have a Treeview (telerik) using HierarchicalDataTemplate

            The user MUST select the node BEFORE checking the checkbox. Is it possible to select the node when the user checks the checkbox.

            Never underestimate the power of human stupidity RAH

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            The trick was to add an ItemContainerStyle because I am using a HeirarchicalDataTemplate

            	<Style.Triggers>
            		<Trigger Property="IsKeyboardFocusWithin" Value="true">
            			<Setter Property="IsSelected" Value="true" />
            		</Trigger>
            	</Style.Triggers>							
            

            Never underestimate the power of human stupidity RAH

            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