Good patterns for building a wizard?

前端 未结 2 2117
自闭症患者
自闭症患者 2021-02-09 07:13

I usually use a TabControl and somehow hide the tabs and navigate through them.

I am curious about other ways of doing this!!!

2条回答
  •  无人共我
    2021-02-09 07:39

    You could use a collection of Panel objects, with all but the first panel having their Visible property set to false.

    Store the index of the current panel, and have "Next" and "Previous" buttons that change this index appropriately. When this index is changed, make the appropriate panels visible/not visible as needed (only the current panel should be visible at a given time).

    You can also handle the IsVisibleChanged event on some/all of your panels, to trigger certain behaviors to occur when the user navigates to a particular panel.

提交回复
热议问题