Click here to Skip to main content
15,914,419 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF DataGrid cell click Pin
Erik Rude4-May-12 1:31
Erik Rude4-May-12 1:31 
GeneralRe: WPF DataGrid cell click Pin
LAPEC4-May-12 1:51
LAPEC4-May-12 1:51 
GeneralRe: WPF DataGrid cell click Pin
Erik Rude4-May-12 2:46
Erik Rude4-May-12 2:46 
AnswerRe: WPF DataGrid cell click Pin
Jeremy Hutchinson4-May-12 2:46
professionalJeremy Hutchinson4-May-12 2:46 
Questionuser control Pin
MemberDotNetting3-May-12 13:40
MemberDotNetting3-May-12 13:40 
AnswerRe: user control Pin
Jeremy Hutchinson4-May-12 2:34
professionalJeremy Hutchinson4-May-12 2:34 
AnswerRe: user control Pin
Alisaunder6-May-12 2:23
Alisaunder6-May-12 2:23 
QuestionHow to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#3-May-12 4:02
Rocky#3-May-12 4:02 
AnswerRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Jeremy Hutchinson3-May-12 5:30
professionalJeremy Hutchinson3-May-12 5:30 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#3-May-12 20:42
Rocky#3-May-12 20:42 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Jeremy Hutchinson4-May-12 1:48
professionalJeremy Hutchinson4-May-12 1:48 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#4-May-12 3:05
Rocky#4-May-12 3:05 
AnswerRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Mycroft Holmes3-May-12 12:46
professionalMycroft Holmes3-May-12 12:46 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#3-May-12 20:19
Rocky#3-May-12 20:19 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Pete O'Hanlon3-May-12 20:29
mvePete O'Hanlon3-May-12 20:29 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#3-May-12 20:43
Rocky#3-May-12 20:43 
AnswerRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Wayne Gaylard3-May-12 21:09
professionalWayne Gaylard3-May-12 21:09 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Rocky#4-May-12 3:04
Rocky#4-May-12 3:04 
GeneralRe: How to get the value of textbox in ViewModel in WPF - MVVM Pin
Wayne Gaylard4-May-12 20:22
professionalWayne Gaylard4-May-12 20:22 
QuestionHelp Understanding Dependancy Properties Pin
Kevin Marois2-May-12 7:10
professionalKevin Marois2-May-12 7:10 
AnswerRe: Help Understanding Dependancy Properties Pin
Abhinav S2-May-12 7:17
Abhinav S2-May-12 7:17 
GeneralRe: Help Understanding Dependancy Properties Pin
Kevin Marois2-May-12 7:38
professionalKevin Marois2-May-12 7:38 
AnswerRe: Help Understanding Dependancy Properties Pin
SledgeHammer012-May-12 7:24
SledgeHammer012-May-12 7:24 
Kevin Marois wrote:
Every time I look at learning about DP's, I walk away confused.
 

Anyone know of any decent entry level tutorials?


What's confusing about them?

By now, I assume you are familiar with data binding? Well, as you know... in order for the WPF UI subsystem to know when to update a UI element, it needs to know when the data value has changed. It needs to be able to know that on ANY object, so there needs to be a standard mechanism.

In fact, there are two standard mechanisms.

1) INotifyPropertyChanged / INotifyCollectionChanged - this is how you implement your view models & business objects... typically you'll have your ViewModelBase / ObservableObject base classes and derive everything from them

2) Dependency Properties - Generally, you shouldn't really need to use them in user applications since mechanism #1 is favored for that and DPs are a relative PITA to implement (vs mech #1). They are just objects that are stored by the framework instead of in your object and automatically implement change notification. I generally like to use them in custom controls only.

The benefit of DPs is that you don't need to liter your code with OnPropertyChanged("Foo"); type code.

The downside of DPs is that you have to 1) register them (around 2 to 10 lines of code depending on what options you use) 2) implement getter & setter (just call GetValue / SetValue).

There is a Visual Studio macro that spits out the code, so no biggie.

If you want to hook into the change notification, you need to register a STATIC callback, redirect into your VM, etc.

Just a royal PITA.

Basically, you should only use DP's in controls.

EDIT: there are some features that require use of DPs such as animations.
GeneralRe: Help Understanding Dependancy Properties Pin
Kevin Marois2-May-12 7:37
professionalKevin Marois2-May-12 7:37 
QuestionMove picture Pin
Reginaldo Ap Primo2-May-12 3:30
Reginaldo Ap Primo2-May-12 3:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.