Information générale
Catégorie:
Windows Presentation Foundation (WPF)
>Hi,
>
>I had a WPF window defined in code with a DependencyProperty set up. In a XAML window sub-classed from this I have controls bound two-way to the DP. This works.
>
>I changed the whole thing to be Page based (i.e. Page derived class with the same code as in the Window class, subclassed XAML page with the same Bindings). This compiles fine, shows no binding failures in the Output window - but the bindings don't work!
>
>Anyone have a clue why this may be?
It's because you forget to change the ownertype parameter from Window to Page in the DependencyProperty.Register call, you dummy. Took me an hour to find this!!!!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement