XAML
Markup language used to instantiate .NET objects
This defines the arrangement of panels, buttons and controls to make up a WPF application.
Use xaml to design the appearance of the user interface
XAML Namespaces
There are a number of different namespaces
schemas.microsoft.com/winfx/2006/xaml/presentation
WPF 4.0
The latest of release of WPF adds a number of refinements, including some valuable new features that build on the existing WPF infrastructure. Some of the most notable changes include better text rendering, more natural animation, and support for Windows 7 features such as multitouch and the new taskbar.
WPF 3.5 SP1
When the .NET Framework Service Pack 1 (SP1) was released, the designers of WPF had a chance to slip in a few new features, such as slick graphical effects (courtesy of pixel shaders) and the sophisticated DataGrid control.
WPF 3.5.
A year later, a new version of WPF was released as part of the .NET
Framework 3.5. The new features in WPF are mostly minor refinements, including
bug fixes and performance improvements.
WPF 3.0.
The first version of WPF was released with two other new technologies:
Windows Communication Foundation (WCF) and Windows Workflow Foundation
(WF). Together, these three technologies were called the .NET Framework 3.0.
Visual Tree
System.Windows.Media.VisualTreeHelper - only contains instance of DependencyObject sub classes
GetChildrenCount
GetChild
Logical Tree
System.Windows.LogicalTreeHelper - only contains instances of DependencyObject sub classes
Represents the structure of your UI
Closely matches the elements you declare in the XAML
A given window/control will have one visual tree but could have any number of logical trees
The LogicalTree can contain objects of any type
GetChildren
static System.Windows.DependencyObject.SearchTreeView<T> (System.Windows.DependencyObject source)
{
while (source != null && source.GetType() != typeof(T) )
{
source = System.WIndows.Media.VisualTreeHelper.GetParent(source);
}
return source;
}
Control Template
Each control has a default template that defines its visual appearance
Each control has a Template property which can be used to override the default template
When you create a ControlTemplate you replace the appearance of the control without changing its functionality
A control template is created in XAML
You can use the Microsoft Expression Blend designer
If you override the controltemplate for a control/object then it is all replaces. You cannot override part of it.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext