WPF - RelativeSource Reliure problème
-
01-10-2019 - |
Question
Je suis en train de créer un bouton de retour. Je suis donc liant les navigationwindows backstack.
Code:
<Hyperlink Name="back" NavigateUri="{Binding RelativeSource={RelativeSource AncestorType={x:Type NavigationWindow}}, Path=BackStack}">
Problème:
- Erreur:. Mode doit être spécifié pour RelativeSource
Mise à jour:
Il est pas la navigation à la page précédente.
Gita.
La solution
Ajouter Mode=FindAncestor
au RelativeSource Reliure:)
{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type NavigationWindow}}, Path=BackStack}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow