Reading a Property from UI into the Model #20120
Unanswered
ProphetLamb
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My app has a setup wizard built using a
TabView
and a set ofTabViewItems
. EachTabViewItem
is a bespoke xaml control, they share aSave & Next
button.I wish to implement the following behaviour:
Given not the last
TabViewItem
is visible.When
Save & Next
is activated.Then the next
TabViewItem
is visible.Given the last
TabViewItem
is visible.When
Save & Next
is activated.Then the
Page
navigates back.Currently I hardcode the number of
TabViewItems
in theTabView
in.I determine whether the current tab is the last one, by binding the
SelectedIndex
of theTabView
, and comparing its value with the total number of tabs.How would I bind the property
WizardTabsCount
to the value ofTabView.ItemsCollection.Count
.I absolutely wish to avoid a reference to the
ItemCollection
in my model, executing code outside of the UI thread.Implementing a converter from
ItemCollection
toint
and then twoway bind theItemCollection
to an empty stateWizardTabsCount
, yields a binding error.How should I best go about this?
This implementation is preparation for hiding certain steps, removing
TabViewItems
dynamically, if the user needs not fill them.Beta Was this translation helpful? Give feedback.
All reactions