Revision 53032fb7

b/trunk/Pithos.Client.WPF/Preferences/AddAccountView.xaml
9 9
        <my:InverseBoolConverter x:Key="InverseBool" />
10 10
        <BooleanToVisibilityConverter x:Key="BoolToVisible" />
11 11
    </Window.Resources>
12
    <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged">
12
    <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged" HelpButtonVisibility="Collapsed">
13 13
        <extToolkit:WizardPage x:Name="IntroPage" 
14 14
                                   Title="Add new Pithos Account"
15 15
                                   Description="This Wizard will walk you through adding a new Pithos account and retrieving an authentication token" 
......
51 51
                                   Description="Please enter the account credentials and press &quot;Validate Credentials&quot;"
52 52
                               NextPage="{Binding ElementName=AccountPathPage}"                               
53 53
                               FinishButtonVisibility="Collapsed"
54
                               CanSelectNextPage="{Binding HasValidCredentials}" 
54
                               CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=True}" 
55
                               TargetUpdated="OnTargetUpdated"
55 56
                               >
56 57
            <extToolkit:BusyIndicator x:Name="ManualBusyIndicator" IsBusy="{Binding IsWorking,NotifyOnSourceUpdated=true}" DisplayAfter="0" >
57 58
                <extToolkit:BusyIndicator.BusyContent>
......
81 82
        </extToolkit:WizardPage>
82 83
        <extToolkit:WizardPage x:Name="AutoAccountPage" PageType="Interior"
83 84
                                   Title="Add an account automatically"
84
                                   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."
85
                               NextPage="{Binding ElementName=AutoConfirmedPage}"                               
85
                                   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."                               
86 86
                               FinishButtonVisibility="Collapsed"
87
                               CanSelectNextPage="{Binding HasValidCredentials}"                               
87
                               CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=true}"                               
88
                               TargetUpdated="OnTargetUpdated"
88 89
                               >
89 90
            <extToolkit:BusyIndicator x:Name="AutoBusyIndicator" IsBusy="{Binding IsWorking}" DisplayAfter="0">
90 91
                <extToolkit:BusyIndicator.BusyContent>
b/trunk/Pithos.Client.WPF/Preferences/AddAccountView.xaml.cs
22 22
        public AddAccountView()
23 23
        {
24 24
            InitializeComponent();
25
            
26
            //When the busy indicator changes, force a focus change. Workaround for delayed change of the Next button's visibility
27
            ManualBusyMessage.IsVisibleChanged += (sender, evt) => Token.Focus();
28
            ValidationMessage.IsVisibleChanged += (sender, evt) => ValidationMessage.Focus();
29 25
        }
30 26

  
31 27

  
......
61 57
            _history.Push(AccountWizard.CurrentPage);
62 58

  
63 59
        }
60

  
61
        private void OnTargetUpdated(object sender, DataTransferEventArgs e)
62
        {
63
            //It is not enough to change the value of the CanSelectNextPage property of the page to enable
64
            //the next page button.
65
            //Must force the re-evaluation of the NextPage command's CanExecute method             
66
            if (e.Property == WizardPage.CanSelectNextPageProperty)
67
                CommandManager.InvalidateRequerySuggested();
68
        }
64 69
    }
65 70
}

Also available in: Unified diff