All WPF management properties are dependent properties. Truth or lie?

Answering this question, I noticed that I never came across any property that is not a dependency property (WPF Controls, no third-party controls). Although, when I started with WPF, I remember reading somewhere that "more than 90% of the properties of WPF controls are dependency properties."

Can someone give examples / links of CLR properties in WPF controls and why is this so?

Update:

Went through this lecture: http://www.miszalok.de/Lectures/L17_WPF/C4_DependencyProperties/DependencyProperties.pdf

What says:

The shortcut has 18 traditional and 71 dependency properties.

Button

has 18 traditional and 78 dependency properties.

+3
source share
3 answers

PasswordBox property Password is not implemented as a dependency property to avoid data binding, otherwise it would be a security threat. See this post for more details .

+6
source

Panel.Childrenor FrameworkElement.Resourcesare not dependency properties

+1
source

WPF 4 CommandParameters CLR-!

MSDN:

Snap to commandson InputBinding. You can bind the Command property of a class InputBindingto an instance that is defined in the code. The following properties are dependency properties, so they can be binding objects:

  • InputBinding.Command
  • InputBinding.CommandParameter
  • InputBinding.CommandTarget
  • KeyBinding.Key
  • KeyBinding.Modifiers
  • MouseBinding.MouseAction

http://msdn.microsoft.com/en-us/library/bb613588.aspx

+1
source

Source: https://habr.com/ru/post/1765969/


All Articles