Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]MVVM Framework
  [Expand]ViewModels
  [Expand]Commands
  [Collapse]Behaviors
    Getting Started
   [Collapse]Predefined Set
     EventToCommand
     KeyToCommand
     FocusBehavior
     ValidationErrorsHostBehavior
     ConfirmationBehavior
     DependencyPropertyBehavior
     EnumItemsSourceBehavior
     CompositeCommandBehavior
     FunctionBindingBehavior
     MethodToCommandBehavior
     CurrentWindowSerializationBehavior
     BarSubItemThemeSelectorBehavior
     BarSplitItemThemeSelectorBehavior
     RibbonGalleryThemeSelectorBehavior
    How to: Create a Custom Behavior
  [Expand]Services
  [Expand]DXBinding
  [Expand]MIF
   Converters
   ViewLocator
   Messenger
   Data Annotation Attributes
   LayoutTreeHelper
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

DependencyPropertyBehavior

Sometimes, some properties of a UI control are not dependency properties, for instance, the TextBox.SelectedText property. This means the WPF binding system cannot target this property and the code below is not allowed

DependencyPropertyBehavior can be used to overcome such issues.

To use the DependencyPropertyBehavior, it is necessary to set three its properties:

  • PropertyName - specifies the name of a property that should be bound.
  • Binding - specifies a binding that should be applied to the specified property.
  • EventName - specifies an event which the DependencyPropertyBehavior process to perform updating of the specified binding.

Expanded Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T122997.

Is this topic helpful?​​​​​​​