コード例 #1
0
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            wizardControl = UIMixin.FindAncestor<WizardControl>(this);
            PreviousCommand = new RelayCommand(() => wizardControl.GoBackCommand.Execute(null), () => wizardControl.GoBackCommand.CanExecute(null));
            NextCommand = new RelayCommand(() => wizardControl.GoNextCommand.Execute(null), () => wizardControl.GoNextCommand.CanExecute(null) && IsValid);
            ExecuteCommand = wizardControl.ExecuteCommand;

            var vssHost = wizardControl.GetChildOfType<Border>();
            var stateGroups = VisualStateManager.GetVisualStateGroups(vssHost);

            sizeModes = stateGroups.First(stateGroup => stateGroup.Name == "SizeModes");
            sizeModes.CurrentStateChanged += SizeModesOnCurrentStateChanged;
            wizardControl.SelectionChanged += WizardControlOnSelectionChanged;

            UpdateSizeStates();
            UpdateIsValidStates();
            UpdateFinishStates();
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: qratosone/CSharp
 private void BTNStart_Click(object sender, EventArgs e)
 {
     ctrl = new WizardControl();
     ctrl.Start();
 }