<my:InverseBoolConverter x:Key="InverseBool" />
<BooleanToVisibilityConverter x:Key="BoolToVisible" />
</Window.Resources>
- <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged">
+ <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged" HelpButtonVisibility="Collapsed">
<extToolkit:WizardPage x:Name="IntroPage"
Title="Add new Pithos Account"
Description="This Wizard will walk you through adding a new Pithos account and retrieving an authentication token"
Description="Please enter the account credentials and press "Validate Credentials""
NextPage="{Binding ElementName=AccountPathPage}"
FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding HasValidCredentials}"
+ CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=True}"
+ TargetUpdated="OnTargetUpdated"
>
<extToolkit:BusyIndicator x:Name="ManualBusyIndicator" IsBusy="{Binding IsWorking,NotifyOnSourceUpdated=true}" DisplayAfter="0" >
<extToolkit:BusyIndicator.BusyContent>
</extToolkit:WizardPage>
<extToolkit:WizardPage x:Name="AutoAccountPage" PageType="Interior"
Title="Add an account automatically"
- Description="By clicking on the button below you will be taken to the Pithos web site where you can login with your username and password."
- NextPage="{Binding ElementName=AutoConfirmedPage}"
+ Description="By clicking on the button below you will be taken to the Pithos web site where you can login with your username and password."
FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding HasValidCredentials}"
+ CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=true}"
+ TargetUpdated="OnTargetUpdated"
>
<extToolkit:BusyIndicator x:Name="AutoBusyIndicator" IsBusy="{Binding IsWorking}" DisplayAfter="0">
<extToolkit:BusyIndicator.BusyContent>
public AddAccountView()
{
InitializeComponent();
-
- //When the busy indicator changes, force a focus change. Workaround for delayed change of the Next button's visibility
- ManualBusyMessage.IsVisibleChanged += (sender, evt) => Token.Focus();
- ValidationMessage.IsVisibleChanged += (sender, evt) => ValidationMessage.Focus();
}
_history.Push(AccountWizard.CurrentPage);
}
+
+ private void OnTargetUpdated(object sender, DataTransferEventArgs e)
+ {
+ //It is not enough to change the value of the CanSelectNextPage property of the page to enable
+ //the next page button.
+ //Must force the re-evaluation of the NextPage command's CanExecute method
+ if (e.Property == WizardPage.CanSelectNextPageProperty)
+ CommandManager.InvalidateRequerySuggested();
+ }
}
}