mui:LinkGroup & mui:Link DisplayName as DependencyProperty #3
Comments
Hi picrap, this can help consider this sample: /*******************************/ <mui:Link DisplayName="customer" Source="/Pages/Customer.xaml" x:Name="CustomerLink" /> /*******************************/ /*******************************/ private const string Prefix = "MyApp:Resource:";
|
I'll have a workaround solution soon, however I am still thinking that a DependencyProperty here may be a good thing. I'll see if I can submit you a pull request with proper change. |
I have one question: why does the class NotifyPropertyChanged not inherit from DependencyObject? Basically, instead of using INotifyPropertyChanged, all properties could be implemented as dependency properties, which makes sense when in WPF controls. |
It is certainly possible to change the Link properties to dependency properties, but I would advice against it, since the Link class is part of the Presentation layer in MVVM. Presentation classes are View agnostic, where a DependencyProperty implementation ties it to the View layer. An interesting discussion about this at stack overflow: http://stackoverflow.com/questions/291518/inotifypropertychanged-vs-dependencyproperty-in-viewmodel |
I agree with the discussion, which discusses of view-models. We tried a few years ago to use dependency properties in view-models, and it lead to a dead end: we had infinite loops with view, because of multithreading (as far as I remember). |
I submitted a pull request, so I close this issue. |
Currently they are simple properties and can not be bound, making localization hard to achieve here.
Is it possible to turn them into DependencyProperty ?
The text was updated successfully, but these errors were encountered: