![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parental Controls and printer problem | spook68 | Vista account administration | 0 | 02-20-2008 01:09 PM |
| ActiveX controls Problem | Dwaggie67 | Vista security | 5 | 10-03-2007 11:27 PM |
| Parental Controls | dearheart606 | Vista account administration | 1 | 08-19-2007 12:00 PM |
| Parental Controls Pin Problem | Chad | Vista Games | 0 | 05-03-2007 12:04 PM |