コード例 #1
0
            private static async void EnableView()
            {
                ViewEnabled = true;

                root.sv_root.IsEnabled = true;

                ShowDisablePanel.Stop();
                HideDisablePanel.Begin();

                await root.Dispatcher.Yield();

                root.Focus(FocusState.Programmatic);
            }
コード例 #2
0
            private static void DisableView(double?progress)
            {
                ViewEnabled = false;

                root.FindName(nameof(root.rp_Disable));
                root.sv_root.IsEnabled     = false;
                root.rp_Disable.Visibility = Visibility.Visible;
                var indeterminate = !progress.HasValue;
                var keep          = double.IsNaN(progress.GetValueOrDefault());

                if (!keep)
                {
                    root.pb_Disable.IsIndeterminate = indeterminate;
                    if (!indeterminate)
                    {
                        root.pb_Disable.Value = progress.Value;
                    }
                }

                HideDisablePanel.Stop();
                ShowDisablePanel.Begin();
            }