當前位置: 首頁>>代碼示例>>C#>>正文


C# Input.KeyboardFocusChangedEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Input.KeyboardFocusChangedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# KeyboardFocusChangedEventArgs類的具體用法?C# KeyboardFocusChangedEventArgs怎麽用?C# KeyboardFocusChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


KeyboardFocusChangedEventArgs類屬於System.Windows.Input命名空間,在下文中一共展示了KeyboardFocusChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnGotKeyboardFocus

        protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
        {
            if (Model != null)
                Model.IsActive = true;

            base.OnGotKeyboardFocus(e);
        }
開發者ID:x-skywalker,項目名稱:CodeMask,代碼行數:7,代碼來源:LayoutAnchorableControl.cs

示例2: OnLostKeyboardFocus

 protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
 {
     txtReadOnly.Visibility = Visibility.Visible;
     txtEdit.Visibility = Visibility.Collapsed;
     Text = EditedText;
     base.OnLostKeyboardFocus(e);
 }
開發者ID:gitter-badger,項目名稱:vc-community-1.x,代碼行數:7,代碼來源:TextBlockTextBoxControl.xaml.cs

示例3: projectTextBox_OnLostKeyboardFocus

 private void projectTextBox_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (!string.IsNullOrEmpty(this.selectedProject.ProjectLabel))
     {
         this.selectProject(this.selectedProject);
     }
 }
開發者ID:Nukil,項目名稱:toggldesktop,代碼行數:7,代碼來源:AutotrackerSettings.xaml.cs

示例4: Window_LostKeyboardFocus

 private void Window_LostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (!closing)
     {
         this.Close();
     }
 }
開發者ID:njpanzarino,項目名稱:Kinect,代碼行數:7,代碼來源:AutoCalWindow.xaml.cs

示例5: ValidDateTextBox_PreviewLostKeyboardFocus

 private void ValidDateTextBox_PreviewLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (HasError)
     {
         e.Handled = true;
     }
 }
開發者ID:WilliamCopland,項目名稱:YPILIS,代碼行數:7,代碼來源:ValidDateTextBox.cs

示例6: OnGotKeyboardFocus

 protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
 {
     if (this.IsKeyboardFocusWithin)
     {
         this.lastElementWithFocus = e.NewFocus as FrameworkElement;
     }
 }
開發者ID:UnaNancyOwen,項目名稱:Kinect-Studio-Sample,代碼行數:7,代碼來源:BladePage.cs

示例7: OnGotKeyboardFocus

 protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
 {
   if ((e.OldFocus is DataGridCell)) return;
   Keyboard.Focus(_lastDataGridFocus);
   if (SelectedIndex == -1 && Items.Count > 0) SelectedIndex = 0;
   e.Handled = true;
 }
開發者ID:dggowda047,項目名稱:itraacv2-1,代碼行數:7,代碼來源:WPFHelpers.cs

示例8: tbName_GotKeyboardFocus

 private void tbName_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (tbName.Text == "Имя")
     {
         tbName.Text = "";
     }
 }
開發者ID:koorool,項目名稱:SSMA,代碼行數:7,代碼來源:wAddMarkerDialog.xaml.cs

示例9: OnGotKeyboardFocus

        protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
        {
            if (SelectAllOnGotFocus)
                SelectAll();

            base.OnGotKeyboardFocus(e);
        }
開發者ID:krikelin,項目名稱:torshify-client,代碼行數:7,代碼來源:WatermarkTextBox.cs

示例10: txtMyProfile_GotKeyboardFocus

 private void txtMyProfile_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (txtMyProfile.Text == DefaultTextMySteamProfile)
     {
         txtMyProfile.Clear();
     }
 }
開發者ID:BlueRaja,項目名稱:SteamWishlistSharedLibrary,代碼行數:7,代碼來源:MainWindow.xaml.cs

示例11: OnKeyboardFocus

 void OnKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (e.NewFocus == this)
     {
         terminalControl.Focus();
         Keyboard.Focus(terminalControl);
     }
 }
開發者ID:npcook,項目名稱:terminal,代碼行數:8,代碼來源:MainWindow.xaml.cs

示例12: OnGotKeyboardFocus

		/// Forward focus to TextArea.
		/// <inheritdoc/>
		protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
		{
			base.OnGotKeyboardFocus(e);
			if (e.NewFocus == this) {
				Keyboard.Focus(this.TextArea);
				e.Handled = true;
			}
		}
開發者ID:AkshayVats,項目名稱:SuperShell,代碼行數:10,代碼來源:TextEditor.cs

示例13: OnGotKeyboardFocus

 private void OnGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
 {
     if (e.OldFocus is MenuItem)
     {
         return;
     }
     SelectTextInTextBox(sender);
 }
開發者ID:heinersuter,項目名稱:simple-ui-tests,代碼行數:8,代碼來源:App.xaml.cs

示例14: OnGotKeyboardFocus

 protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
 {
     base.OnGotKeyboardFocus(e);
     if (this.SelectedIndex == -1)
     {
         this.SelectedIndex = 0;
     }
 }
開發者ID:CAPCHIK,項目名稱:roslyn,代碼行數:8,代碼來源:AutomationDelegatingListView.cs

示例15: OnLostKeyboardFocus

		protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
		{
			base.OnLostKeyboardFocus(e);
			if (IsKeyboardFocusWithin)
				return;
			if (IsOpen)
				Child.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
		}
開發者ID:xbadcode,項目名稱:Rubezh,代碼行數:8,代碼來源:RibbonPopup.cs


注:本文中的System.Windows.Input.KeyboardFocusChangedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。