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. How to get event of button inside stackpanel?very urgent....

How to get event of button inside stackpanel?very urgent....

Scheduled Pinned Locked Moved WPF
questionhelptutorial
4 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.
  • S Offline
    S Offline
    salon
    wrote on last edited by
    #1

    I have a stackpanel having one image and one stackpanel having button control..... I want to do the same thing on StackPanel click as the button click which is the child of that stackpanel How can I do that....? I have wrote something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content... Anyhow i need the button name and content inside the stackpanel on MouseLeftButtonDown event of that stackpanel... Can i get that? Please help me, its very urgent....

    M 1 Reply Last reply
    0
    • S salon

      I have a stackpanel having one image and one stackpanel having button control..... I want to do the same thing on StackPanel click as the button click which is the child of that stackpanel How can I do that....? I have wrote something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content... Anyhow i need the button name and content inside the stackpanel on MouseLeftButtonDown event of that stackpanel... Can i get that? Please help me, its very urgent....

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      salon wrote:

      something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content.

      I'm not sure what you're asking here....if the button is a child of the stackpanel, and the button has a name, why are you unable to just use the button by name? Can you post a simple example of the xaml/code-behind involved to make it more clear? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      S 1 Reply Last reply
      0
      • M Mark Salsbery

        salon wrote:

        something on MouseLeftButtonDown event of stackpanel but not able to get the button name and content.

        I'm not sure what you're asking here....if the button is a child of the stackpanel, and the button has a name, why are you unable to just use the button by name? Can you post a simple example of the xaml/code-behind involved to make it more clear? Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        S Offline
        S Offline
        salon
        wrote on last edited by
        #3

        Thanks for kind and quick reply.... Problem is solved :laugh:

        V 1 Reply Last reply
        0
        • S salon

          Thanks for kind and quick reply.... Problem is solved :laugh:

          V Offline
          V Offline
          VbGuru613
          wrote on last edited by
          #4

          whats the answer?

          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