BaconographyW8.App.SetSearchKeyboard C# (CSharp) Метод

SetSearchKeyboard() статический приватный Метод

static private SetSearchKeyboard ( bool value ) : void
value bool
Результат void
        internal static void SetSearchKeyboard(bool value)
        {
            try
            {
                //this needs to be guarded as the search pane can disappear on us if we're getting dumped out of/suspended
                var sp = Windows.ApplicationModel.Search.SearchPane.GetForCurrentView();
                if (sp != null)
                    sp.ShowOnKeyboardInput = value;
            }
            catch
            {
                //do nothing we were most likely shutting down
            }
        }

Usage Example

Пример #1
0
        private void TriggerLogin(Windows.UI.Popups.IUICommand command)
        {
            var flyout = new SettingsFlyout();

            flyout.Content    = new LoginView();
            flyout.HeaderText = "Login";
            flyout.IsOpen     = true;
            flyout.Closed    += (e, sender) =>
            {
                Messenger.Default.Unregister <CloseSettingsMessage>(this);
                SetSearchKeyboard(_isTypeToSearch);
            };
            Messenger.Default.Register <CloseSettingsMessage>(this, (message) =>
            {
                flyout.IsOpen = false;
                SetSearchKeyboard(_isTypeToSearch);
            });

            _isTypeToSearch = GetSearchKeyboard();
            App.SetSearchKeyboard(false);
        }
All Usage Examples Of BaconographyW8.App::SetSearchKeyboard