XAML: declarative language, separated UI and logic, Code-Behind. The core concept of WPF is data-driven UI. X: Class x: ClassModifier x: Name x: FieldModifier x: Key x: Shared x: Type x: Null x: Array x: Static x: Code x: XData (1) layout control Grid StackPanel DockPanel Canvas WrapPanel (2) content control Window Button (3) Groupbox with title content control, TabItem (4) entry control ListBox (5) control with title entry TreeViewItem MenuItem (6) special content control TextBox TextBlock Image INotifyPropertyChanged UpdateSourceTrigger ValidationRule ValidatesOnTargetUpdated invalid yonvalidationerror I ValueConverter MultiBinding BindingMode: TwoWay, OneWay, OneWayToSource, Default is the method of specifying Source for Binding (1) specify a single object of common CLR type as Source (2) specify the common CLR base class type object as Source (3) and set ADO. NET data Object is specified as Source (4) use XMLDataProvider to specify XML data as Source (5) and specify Dependency Object as Source (6) specify the container's DataContext as Source (7) using ElementName to specify Source (8) using the RelativeSource attribute of Binding to specify Source (9) to specify the ObjectDataProvider object as Source (10) use the data objects retrieved by using LINQ as Bi Nding source DependencyObject: Real-time space allocation this capability relies on DependencyProperty to load routing events: AddHandler view event VisualTree Source: e. originalSource: e. source sends the routing event button1.RaiseEvent (arg) to delete the routing event: RemoveHandler custom routing events need to be defined on the custom control of the basic elements of the Command: (1) Command) class that implements ICommand. Generally, the most popular class is RoutedCommand. (2) Command Source implements the class of the ICommandSource interface. Many UI interface elements have implemented this interface (3) Command Target, that is, to whom the Command will be sent. The Command target must be a class that implements the IInputElement interface. (4) Command Binding is used to associate some peripheral Logic with commands. To load command-related event commands, follow these steps: (1) create a command class: obtain a class that implements the ICommand interface (2) declare a command instance: you must create an instance of the command class when using the command. (3) Source of the specified command: this. button1.Command = logging instance; (4) Specify the Command target: this. button1.CommandTarget = this. textBoxA (5) set command Association: this. stackPanel. commandBindings. add (cb) CommandParameter: if you think of a command as a shell flying to the target, CommandParameter is equivalent to a "message" loaded in the shell belly. Obtain CommandParameter: e. Parameter StaticResource: one-time resource usage when the program loads data into the memory. Then, it no longer accesses this resource. DynamicResource: indicates that resources are still accessed while the program is running. Template in WPF is divided into two categories: (1) ControlTemplate: determines what the control looks like, and gives programmers the opportunity to extend their own logic on the basis of controlling the original internal logic. (2) DataTemplate: the representation of data content. It determines whether a piece of data is displayed, whether it is a simple text or an intuitive graphic animation. DataTemplate has three common locations: (1) ContentTemplate attribute of ContentControl. (2) ItemsControl ItemTemplate attribute (3) the CellTemplate attribute ItemsControl of GridViewColumn has an attribute named ItemsPanel. The data type ItemsPanelTemplate is also a control Template. The ControlTemplate determines the appearance of the Control, and the emplate determines the appearance of the data. They are the values of the Template and ContentTemplate attributes of the Control class. <Style TargetType = ""> <DataTemplate DataType = ""> HierarchicalDataTemplate is the template that helps the hierarchical control display hierarchical data. The ControlTemplate and DataTemplate classes are derived from the FrameworkTemplate class. This class has a method named FindName for us to retrieve its internal controls. Style Setter Trigger MultiTrigger DataTrigger MultiDataTrigger