WPF Host Computer 2 - Dependency Properties and Routing Events

dependency property

Create dependency properties: shortcut key propd

insert image description here
insert image description here
insert image description here
insert image description here

Benefits of Using Dependency Properties

insert image description here

Additional dependency properties: shortcut key propa

insert image description here
insert image description here
insert image description here

Notification method after dependency property changes

insert image description here

When the custom control is used in the main interface, the binding property is used to bind the data to be displayed

insert image description here

The first

insert image description here

the second

insert image description here

The main interface calls and binds the dependency properties of the custom control

insert image description here

Three callback methods of properties

insert image description here

Common properties need to implement notification events

insert image description here
insert image description here

transfer

insert image description here

routed event

insert image description here
insert image description here

get control name

insert image description here

Block parent container events

insert image description here

Guess you like

Origin blog.csdn.net/qq_42832272/article/details/130646716