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


C# TextBox.GetValue方法代碼示例

本文整理匯總了C#中System.Windows.Controls.TextBox.GetValue方法的典型用法代碼示例。如果您正苦於以下問題:C# TextBox.GetValue方法的具體用法?C# TextBox.GetValue怎麽用?C# TextBox.GetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Controls.TextBox的用法示例。


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

示例1: GetMaskExpression

        public static Regex GetMaskExpression(TextBox textBox)
        {
            if (textBox == null)
                throw new ArgumentNullException("textBox");

            return textBox.GetValue(MaskExpressionProperty) as Regex;
        }
開發者ID:baughj,項目名稱:Spark,代碼行數:7,代碼來源:InputMasking.cs

示例2: GetMask

        public static string GetMask(TextBox textBox)
        {
            if (textBox == null)
                throw new ArgumentNullException("textBox");

            return textBox.GetValue(MaskProperty) as string;
        }
開發者ID:baughj,項目名稱:Spark,代碼行數:7,代碼來源:InputMasking.cs

示例3: GetAlwaysScrollToEnd

        public static bool GetAlwaysScrollToEnd(TextBox textBox)
        {
            if (textBox == null)
            {
                throw new ArgumentNullException("textBox");
            }

            return (bool)textBox.GetValue(AlwaysScrollToEndProperty);
        }
開發者ID:RipleyBooya,項目名稱:SyncTrayzor,代碼行數:9,代碼來源:TextBoxUtilities.cs

示例4: GetDefaultTextAfterCommandExecution

        public static string GetDefaultTextAfterCommandExecution(TextBox textBox)
        {
            if (textBox == null)
            {
                throw new ArgumentNullException("textBox");
            }

            return textBox.GetValue(DefaultTextAfterCommandExecutionProperty) as string;
        }
開發者ID:sgh1986915,項目名稱:Sliverlight-Prism,代碼行數:9,代碼來源:ReturnKey.cs

示例5: GetCommand

        public static ICommand GetCommand(TextBox textBox)
        {
            if (textBox == null)
            {
                throw new ArgumentNullException("textBox");
            }

            return textBox.GetValue(CommandProperty) as ICommand;
        }
開發者ID:sgh1986915,項目名稱:Sliverlight-Prism,代碼行數:9,代碼來源:ReturnKey.cs

示例6: GetOrCreateBehavior

        private static ReturnCommandBehavior GetOrCreateBehavior(TextBox textBox)
        {
            ReturnCommandBehavior behavior = textBox.GetValue(ReturnCommandBehaviorProperty) as ReturnCommandBehavior;
            if (behavior == null)
            {
                behavior = new ReturnCommandBehavior(textBox);
                textBox.SetValue(ReturnCommandBehaviorProperty, behavior);
            }

            return behavior;
        }
開發者ID:JohnDMathis,項目名稱:Pippin,代碼行數:11,代碼來源:ReturnKey.cs

示例7: GetOrCreateBehavior

        private static TextBoxTextChangedCommandBehavior GetOrCreateBehavior(TextBox textBox)
        {
            TextBoxTextChangedCommandBehavior behavior = textBox.GetValue(TextChangedCommandBehaviorProperty) as TextBoxTextChangedCommandBehavior;
            if (behavior == null)
            {
                behavior = new TextBoxTextChangedCommandBehavior(textBox);
                textBox.SetValue(TextChangedCommandBehaviorProperty, behavior);
            }

            return behavior;
        }
開發者ID:tian1ll1,項目名稱:WPF_Examples,代碼行數:11,代碼來源:TextChanged.cs

示例8: GetValue

		public void GetValue ()
		{
			ConcreteDependencyObject cdo = new ConcreteDependencyObject ();
			Assert.Throws<Exception> (delegate {
				cdo.GetValue (InputMethod.IsInputMethodEnabledProperty);
			}, "GetValue");

			TextBox tb = new TextBox ();
			Assert.IsTrue ((bool) tb.GetValue (InputMethod.IsInputMethodEnabledProperty), "TextBox");

			MyTextBox mtb = new MyTextBox ();
			Assert.IsTrue ((bool) mtb.GetValue (InputMethod.IsInputMethodEnabledProperty), "MyTextBox");
		}
開發者ID:dfr0,項目名稱:moon,代碼行數:13,代碼來源:InputMethodTest.cs

示例9: GetOnlyDecimal

 public static bool GetOnlyDecimal(TextBox textBox)
 {
     return (bool)textBox.GetValue(OnlyDecimalProperty);
 }
開發者ID:rymbln,項目名稱:CINCOPA,代碼行數:4,代碼來源:TextBoxHelpers.cs

示例10: GetSelectTextOnFocus

 public static SelectTextOnFocus GetSelectTextOnFocus(TextBox element) { return (SelectTextOnFocus)element.GetValue(SelectTextOnFocusProperty); }
開發者ID:philcockfield,項目名稱:Open.TestHarness.SL,代碼行數:1,代碼來源:Behaviors.cs

示例11: GetSelectAllTextOnFocus

 public static bool GetSelectAllTextOnFocus(TextBox textBox)
     => (bool) textBox.GetValue(SelectAllTextOnFocusProperty);
開發者ID:SIXNetworks,項目名稱:withSIX.Desktop,代碼行數:2,代碼來源:TextBoxBehavior.cs

示例12: GetRealTimeText

 public static string GetRealTimeText(TextBox obj)
 {
     return (string)obj.GetValue(RealTimeTextProperty);
 }
開發者ID:radu-ungureanu,項目名稱:Grimacizer,代碼行數:4,代碼來源:Binder.cs

示例13: GetUpdateTextBoxOnKeyPress

 public static UpdateTextBoxOnKeyPress GetUpdateTextBoxOnKeyPress(TextBox element) { return (UpdateTextBoxOnKeyPress)element.GetValue(UpdateTextBoxOnKeyPressProperty); }
開發者ID:philcockfield,項目名稱:Open.TestHarness.SL,代碼行數:1,代碼來源:Behaviors.cs

示例14: GetRollbackOnEscape

		public static bool GetRollbackOnEscape(TextBox target)
		{
			return (bool) target.GetValue(RollbackOnEscapeProperty);
		}
開發者ID:stewmc,項目名稱:vixen,代碼行數:4,代碼來源:TextBoxExtender.cs

示例15: GetLimitTextRegex

 /// <summary>
 /// Gets the regex pattern set for limiting the text of a given text box.
 /// </summary>
 /// <param name="obj">Text box whose LimitText property you're getting.</param>
 /// <returns>String pattern that the regex engine uses on this text box.</returns>
 public static string GetLimitTextRegex(TextBox obj)
 {
     return (string)obj.GetValue(LimitTextRegexProperty);
 }
開發者ID:KnightWhoSaysNi,項目名稱:German-Dictionary,代碼行數:9,代碼來源:AttachedProperties.cs


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