Click here to Skip to main content
15,892,059 members
Articles / Programming Languages / C#

Behavior Pattern - Visual Behaviors in WPF and Avalonia with Practical Samples

Rate me:
Please Sign up or sign in to vote.
4.97/5 (9 votes)
23 Dec 2021MIT12 min read 11.3K   7  
Here I describe the behaviors - functionality that allows modifying and augmenting an object's behavior non-invasively - without modifying the object's code.
Behavior is a relatively new software pattern allowing to modify an object's behavior non-invasively - without modifying the object's code. The attached properties used in WPF and Avalonia can be utilized for creating static behaviors on visual object. This article shows how to create such static behaviors for visual objects and how to use them.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Architect AWebPros
United States United States
I am a software architect and a developer with great passion for new engineering solutions and finding and applying design patterns.

I am passionate about learning new ways of building software and sharing my knowledge with others.

I worked with many various languages including C#, Java and C++.

I fell in love with WPF (and later Silverlight) at first sight. After Microsoft killed Silverlight, I was distraught until I found Avalonia - a great multiplatform package for building UI on Windows, Linux, Mac as well as within browsers (using WASM) and for mobile platforms.

I have my Ph.D. from RPI.

here is my linkedin profile

Comments and Discussions