![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Using StackPanel and User Controls Hello, I have a Window, which contains a stackpanel. I've added two WPF UserControls, each of which contains a Canvas and some elements within the canvases. The problem I have the two User Controls stacked, however, it appears the second Canvas's elements are drawing from the top of the Window, not the second canvas. I can place a TextBlock in the Canvas and set Canvas.Top="1", however, the "1" is set from the Window, not the Canvas in which it is contained. Maybe it's taking a cue from the first Canvas. Anyone know how to address this issue? Or what I'm doing wrong? I'd rather not compensate for this in the User Control, as I want them to be separate, and not know what the other is doing. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Using StackPanel and User Controls Are you explicitly setting the height of the UserControls you're adding (and the contained Cavnas?). I'd think you'd want to use a container class that sizes to fit rather than using a Cavnas. There's no containment on the canvas, although I wouldn't expect it to do what you're describing exactly. --Aaron http://www.wiredprairie.us "Jay" <jipock@acm.org> wrote in message news:e6GOaYUWHHA.5060@TK2MSFTNGP06.phx.gbl... > Hello, > > I have a Window, which contains a stackpanel. I've added two WPF > UserControls, each of which contains a Canvas and some elements within the > canvases. > > The problem I have the two User Controls stacked, however, it appears the > second Canvas's elements are drawing from the top of the Window, not the > second canvas. I can place a TextBlock in the Canvas and set > Canvas.Top="1", however, the "1" is set from the Window, not the Canvas in > which it is contained. Maybe it's taking a cue from the first Canvas. > > Anyone know how to address this issue? Or what I'm doing wrong? I'd rather > not compensate for this in the User Control, as I want them to be > separate, and not know what the other is doing. > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| User account controls | Vista security | |||
| User Account Controls | Vista security | |||