Questions tagged [dependency-properties]

A property in WPF and Silverlight that can be set through methods such as, styling, data binding, animation, and inheritance.

Dependency property is a property backed by a static DependencyProperty instance.

The purpose of dependency properties is to provide a way to compute the value of a property based on the value of other inputs and to provide notification when computed value changes. The priority of inputs which contribute to computation is listed in Dependency Property value precedence overview.

Dependency properties usually have CLR "wrappers": the actual get and set implementations for the property.

Dependency property declaration (static field + wrapper) is a boilerplate code, which follows a certain pattern and can be generated by IDE (check Visual Studio shortcuts here).

General information: Dependency Property Overview

2294 questions
0
votes
0 answers

WPF PropertyChangedEvent is always null

I have a user control with the following elements
0
votes
1 answer

Member is not recognized or accessible WPF

So I know this has been asked many times, I've read about 10 post with this issue. I've restarted Visual Studios and I'm still getting the error. The Member IcoIcon is not recognized or accessible Here is my code public partial class Icomoon :…
EasyBB
  • 6,176
  • 9
  • 47
  • 77
0
votes
1 answer

Using private field as ItemsSource of ItemsControl?

Lets have a class: public partial class MyControl: UserControl{ private ObservableCollection names = new ObservableCollection(); ... } and then in XAML for the same UserControl that is in XAML for class…
Rasto
  • 17,204
  • 47
  • 154
  • 245
0
votes
1 answer

Using Hex in XAML (UWP) to Assign a Value to an Integer DependencyProperty

The bigger question here is whether UWP has a mechanism to facilitate C# code interpreting/parsing a XAML string value to determine an underlying DependencyProperty value in the same manner Brush properties like Fill="" magically managed to do. Has…
kburgoyne
  • 181
  • 1
  • 2
0
votes
1 answer

How to set DP value when the custom control use in the xaml? (when declaring)

My English skill is poor because I'm not a native English speaker. I hope you to understand. I created a custom window that overrides the title bar shape. The part of the xaml code is as shown below.