I have two panels, only one should be visible at the same time. I change between them by clicking a button, one on each panel.
Is there a nice way to do this in xaml without codebehind or viewmodel?
cpanelvisibilitywpfxaml
I have two panels, only one should be visible at the same time. I change between them by clicking a button, one on each panel.
Is there a nice way to do this in xaml without codebehind or viewmodel?
Best Answer
It's actually possible, however quite tricky.
My example works without any code-behind, actually without any value converters, too.
Here is the code: (now simplified version, thanks to @H.B. for ideas)
The idea of using
ToggleButtons
is stolen from some other question at SO