Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Commands trigger only once in Stepper. #168

Open
saklanmaz opened this issue Feb 21, 2022 · 0 comments
Open

Bug: Commands trigger only once in Stepper. #168

saklanmaz opened this issue Feb 21, 2022 · 0 comments

Comments

@saklanmaz
Copy link

saklanmaz commented Feb 21, 2022

Hello, I am making an application as follows. Only the first time I write the code, command is triggered once. It is not triggered afterwards. It didn't make much sense, I don't understand why.

CancelCommand does not work when I close the application and open it again.

      <materialDesign:DialogHost IsOpen="{Binding LipoTestStepperIsOpen}">
            <materialDesign:DialogHost.DialogContent >
                <mde:TabControlStepper IsLinear="False" Layout="Horizontal">
                    <TabItem>
                        <TabItem.Header>
                            <model:StepTitleHeader FirstLevelTitle="What is a Stepper?" />
                        </TabItem.Header>
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Steppers are handy to break a big task into smaller parts. These are so called steps. It displays the progress of the full task as a numbered sequence of steps." TextWrapping="WrapWithOverflow" />
                            <mde:StepButtonBar Continue="CONTINUE" Cancel="CANCEL"
                                               CancelCommand="{Binding LipoTestStepperCancelCommand}"/>
                        </StackPanel>
                    </TabItem>
                    <TabItem>
                        <TabItem.Header>
                            <model:StepTitleHeader FirstLevelTitle="Layout and navigation" />
                        </TabItem.Header>
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="There a two layouts for a Stepper, namely horizontal and vertical. It can be set by using the Layout property." TextWrapping="WrapWithOverflow" />
                            <TextBlock Margin="0,16,0,0" Text="Additionally the Stepper will be in linear mode by setting the IsLinear property to true. This means that the user can only edit the steps in their fixed order. A non-linear Stepper allows the user to edit the steps in any order." TextWrapping="WrapWithOverflow" />
                            <TextBlock Margin="0,16,0,0" Text="The basic navigation inside a stepper will be accomplished by using simple back and continue buttons. They allow the user to browse through the steps in their order. Just use the StepButtonBar like this tutorial to avoid the nasty reimplementation on your own. The user may also switch the steps of a non-linear Stepper by clicking on the headers. " TextWrapping="WrapWithOverflow" />
                            <mde:StepButtonBar Back="BACK" Continue="CONTINUE" Cancel="CANCEL" />
                        </StackPanel>
                    </TabItem>
                    <TabItem>
                        <TabItem.Header>
                            <model:StepTitleHeader FirstLevelTitle="Conclusion" />
                        </TabItem.Header>
                        <StackPanel>
                            <TextBlock Text="Well, that's all to say about this simple stepper version." />
                            <mde:StepButtonBar Back="BACK" Continue="FINISH" Cancel="CANCEL" />
                        </StackPanel>
                    </TabItem>
                </mde:TabControlStepper>
            </materialDesign:DialogHost.DialogContent>
        </materialDesign:DialogHost>
  public RelayCommand LipoTestStepperCancelCommand { get; set; }

 LipoTestStepperCancelCommand = new RelayCommand(LipoTestStepperCancel);

 private void LipoTestStepperCancel(object param)
        {
            LipoTestStepperIsOpen = false;
        }

MaterialDesignExtensions Version 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant