Open allenlooplee opened 3 years ago
Any fixes or workarounds for this? Apparently, they're still not working.
Any fixes or workarounds for this? Apparently, they're still not working.
I don't think there're any official fixes or workarounds for the time being. I used the following helper method in my view models whenever I wanted the Stepper to move to next step:
private void NextStep()
{
MaterialDesignExtensions.Commands.Internal.StepperCommands.ContinueCommand.Execute(this, null);
}
Those commands are tempting to bind to, it's what I tried to first too.
But looking at the documentation, they instead seem to recommend binding to the ContinueNavigationCommand of the Stepper control itself.
Not sure if we have the exact same use case but this worked for me:
<mde:Stepper
x:Name="Stepper"
IsLinear="False"
ContentAnimationsEnabled="False"
Layout="Horizontal"
Steps="{Binding Path=SubSteps, Mode=OneWay}"
ContinueNavigationCommand="{Binding ElementName=Stepper, Path=ActiveStep.Content.SaveCommand}"
/>
Hello,
Currently I defined a Stepper with StepButtonBar in XAML in a WPF app targeting .NET Framework 4.8 in Visual Studio 2019. I noticed the below error in Output window when running the app.
The same issue also showed in the XAML Binding Failures when running the app.
Inside the StepButtonBar of the last step, I tried to bind its CancelCommand and ContinueCommand to CancelCommand and FinishCommand of the bound view model respectively. But the code didn't execute when I clicked the buttons in the StepButtonBar. I have two normal buttons on the same step which also bound to the same commands respectively and the code executed as expected.
I have attached the code as below for your reference. Do I miss something important to make it work or does this hit some bug somehow?
WpfApp1.zip
Thanks/Allen