![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | ScrollViewer breaks my WrapPanel Does anybody have any idea why, when I put a ScrollViewer around a WrapPanel, any buttons contained within the WrapPanel can no longer raise a Click Event? What do I need to do to allow the buttons within the WrapPanel to continue to recognise when they have been clicked? Thanks SteveB |
My System Specs![]() |
| | #2 (permalink) |
| | Re: ScrollViewer breaks my WrapPanel Is there any other information you can provide, as that scenario should work without issue. My quick test works as expected: <ScrollViewer Margin="20.013,19,36,29"> <WrapPanel> <Button x:Name="btnClickMe" Content="Click me!" Click="btnClickMe_Click"/> <Button Content="Button"/> <Button Content="Button"/> <Button Content="Button"/> </WrapPanel> </ScrollViewer> private void btnClickMe_Click(object sender, RoutedEventArgs e) { MessageBox.Show("I was clicked!"); } The MessageBox was displayed when I clicked the first button. --Aaron http://www.wiredprairie.us/journal "steve" <steve@home.com> wrote in message news:%23q9$2hkaHHA.3584@TK2MSFTNGP02.phx.gbl... > Does anybody have any idea why, when I put a ScrollViewer around a > WrapPanel, any buttons contained within the WrapPanel can no longer raise > a Click Event? > > What do I need to do to allow the buttons within the WrapPanel to continue > to recognise when they have been clicked? > > Thanks > > SteveB > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: ScrollViewer breaks my WrapPanel I tried creating a simple test app and I had no problems but in my real app that contains a lot more code it doesn't work. No idea why. Looks like I'll have to build that particular page from scratch and see what happens SteveB "WPCoder" <coder_antispam@wiredprairie.us> wrote in message news:uNk6i8VbHHA.4000@TK2MSFTNGP02.phx.gbl... > Is there any other information you can provide, as that scenario should > work without issue. My quick test works as expected: > > <ScrollViewer Margin="20.013,19,36,29"> > <WrapPanel> > <Button x:Name="btnClickMe" Content="Click me!" > Click="btnClickMe_Click"/> > <Button Content="Button"/> > <Button Content="Button"/> > <Button Content="Button"/> > </WrapPanel> > </ScrollViewer> > > private void btnClickMe_Click(object sender, RoutedEventArgs e) > { > MessageBox.Show("I was clicked!"); > } > > The MessageBox was displayed when I clicked the first button. > > --Aaron > > http://www.wiredprairie.us/journal > > > > "steve" <steve@home.com> wrote in message > news:%23q9$2hkaHHA.3584@TK2MSFTNGP02.phx.gbl... >> Does anybody have any idea why, when I put a ScrollViewer around a >> WrapPanel, any buttons contained within the WrapPanel can no longer raise >> a Click Event? >> >> What do I need to do to allow the buttons within the WrapPanel to >> continue to recognise when they have been clicked? >> >> Thanks >> >> SteveB >> > |
My System Specs![]() |
| | #4 (permalink) |
| | subject I believe your Scrollviewer is being created last so it is in front of your Wrap Panel... Create the Scrollviewer first and then the rest and see if that works, if you're using blend right click the Scrollviewer then >Order>Send to back. You are vague on the information. But this may or may not help I'm not sure what the problem is. EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| My wireless breaks down every 30 min | Network & Sharing | |||
| Vista SP1 breaks VPN | Vista General | |||