Git Product home page Git Product logo

Comments (5)

spiegelp avatar spiegelp commented on June 3, 2024

Hi, are you looking for an event saying "now I am showing the next step"? Such an event does not exist yet but I will add a StepChanged event to my ToDo list.

The Stepper has a property Controller which exposes ActiveStep. This property always contains the current step, because the UI binds to it. I am thinking of exposing a ActiveStep property directly on the Stepper. Or you might want listen to the PropertyChanged event of the controller and check the arguments for the ActiveStep property name.

from materialdesignextensions.

AmitBhatnagar24 avatar AmitBhatnagar24 commented on June 3, 2024

are you looking for an event saying "now I am showing the next step"?

Not an event, but rather a SelectedStep binding, (like a tab control has SelectedItem), which then my ViewModel would know when we have actually reached that step. I need to do this because when I reach a certain step, I need to perform some calculations. Right now I have to do some ugly code-behind inspection on the prev/next steps to see when I am about to reach the step in question.

I am thinking of exposing a ActiveStep property directly on the Stepper

exactly what I would be looking for.

from materialdesignextensions.

AmitBhatnagar24 avatar AmitBhatnagar24 commented on June 3, 2024

Also, how do I know when the Continue / Finish button is clicked - can I bind to that specific button's Command ?

from materialdesignextensions.

spiegelp avatar spiegelp commented on June 3, 2024

Hi, based on your feedback, I added the following members to the Stepper API:

  • read-only ActiveStep property
  • event ActiveStepChangedEvent
  • command properties for navigation callbacks
    • ActiveStepChangedCommand
    • BackNavigationCommand
    • CancelNavigationCommand
    • ContinueNavigationCommand
    • StepNavigationCommand

You can assign your custom command to these new command properties. According well-tried events already exist. The changes will be scheduled for the next release.

from materialdesignextensions.

AmitBhatnagar24 avatar AmitBhatnagar24 commented on June 3, 2024

I'm again adding to this now closed issue because I still feel that I don't know exactly to handle the validation, A new issue is not required.

When I have a 2 Step stepper with BlockNavigationOnValidationErrors set to true. I have derived from Step to allow for validation as per the documents. If I reach step 2 and it fails validation.. why would it prevent me from going back a step? I feel that the BlockNavigationOnValidationErrors should only restrict going to the next step.

How can I accomplish this with the already implemented validation and events/commands already in play?

from materialdesignextensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.