WPF: Dependency Properties and DataContext?

You don't need to refresh the DataContext In fact, your control shouldn't be using it. Make Address a DependencyProperty and then use a TemplateBinding in your control's template: TextBox Text="{TemplateBinding Address. Address1}.

You don't need to refresh the DataContext. In fact, your control shouldn't be using it. Make Address a DependencyProperty and then use a TemplateBinding in your control's template.

I'm not sure I'm making the correct changes in my code. So far I've changed: AddressEntity to inherit from a DependencyObject and Address1 as a DependencyProperty. Then, I turned Address (from within AddressField) into a DependencyProperty.

These things don't help at all. No matter the mix and match of changes I have tried the "Address" property that resides in AddressField is never updated short of doing myAddressField. Address = new Address(...);.

If I try to make it so that Address is databound, it just doesn't want to change. :-/ – m-y Aug 11 '10 at 16:16 I ended up using ` which worked as well. But yes, TemplateBinding is what I was missing... – m-y Aug 11 '10 at 18:39.

You should consider raising an event when the address dp changes.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions