Now that the user control is finished, it's time to added it to the MainWindow of the application. This video show how to configure an XML namespace in the MainWindow to reference the user controls and how to use the namespace in the XAML to add the cont
- [Instructor] Now that I have my user controls…in my project, I need to figure out a way…to add them to my main window.…The technique for doing that is…by using something called an XML namespace.…First thing I need to know…is what .net namespace do my user controls live in?…And I can find that in a couple of ways.…I can open up the XAML file,…switch to vertical mode,…and look at the top of this file.…The top of the file's the root element.…UserControl, and immediately below that…is the class name, x:Class.…
And I haven't talked about this yet in the course.…Every XAML file has to have a .net class affiliated with it.…So you have this x:Class and this says…that the DetailView is part of TailorMadeTours.UserControls.…So this part here is the .net namespace…that contains DetailView.…If you're a C Sharp programmer,…you know the other way of finding this out…is to go over to your C Sharp file,…this is the class file that's affiliated with DetailView.…You can see it has the right name,…and it derives from UserControl.…
- Why choose Windows Presentation Foundation?
- Exploring the project types
- Creating a WPF project in Visual Studio
- Exploring assemblies and parts
- Using the XAML editor
- Creating the UI, including tabs, details, and controls
- Using data binding
- Adding styles
- Writing interaction code
- Using control templates, 3D parts, and effects
Skill Level Intermediate
Learning Visual Studio Team Serviceswith Jose Miguel Rady Allende1h 17m Intermediate
2. Create a WPF Application
3. Create the UI
4. Examples and Concepts
Next steps1m 37s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.