![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Problem nesting controls I'm fairly new to WPF and have been trying different things to learn. However, I'm a bit stumped right now. I created a default WPF application in VS2005 and the Feb CTP. I got rid of the <grid></grid> in the Xaml file, it's pretty much an empty <windows></windows> xaml file. I went ahead and programmatically create a Grid control and then a ScrollViewer control. I then call: ScollViewerControl.Content = GridControl; This seems to work just fine and displays correctly. However, if I changes the XAML file to the following: <windows ..... > <ScrollViewer Name="svXamlControl" ScrollViewer.CanContentScroll="true"> </ScrollViewer> </windows> And then in my code I change it to call: svXamlControl.Content = GridControl; The window appears fine, but my grid control does not render! What am I doing wrong? The other question I have is do all user controls require an associated Xaml file? What about cases where my control simply derives from a base control (e.g. Grid) and just overrides a few members. Otherwise, visually, it's identical. Do I still need an associated XAML file? If so, what would I put in it? The base control's tags? Many thanks, Winthrop |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Problem with Parental Controls | System Security | |||
| VBScript nesting groups cross domains | VB Script | |||
| VBScript nesting groups cross domains | VB Script | |||
| Parental Controls Pin Problem | Vista Games | |||