本文整理汇总了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;
}
示例2: GetMask
public static string GetMask(TextBox textBox)
{
if (textBox == null)
throw new ArgumentNullException("textBox");
return textBox.GetValue(MaskProperty) as string;
}
示例3: GetAlwaysScrollToEnd
public static bool GetAlwaysScrollToEnd(TextBox textBox)
{
if (textBox == null)
{
throw new ArgumentNullException("textBox");
}
return (bool)textBox.GetValue(AlwaysScrollToEndProperty);
}
示例4: GetDefaultTextAfterCommandExecution
public static string GetDefaultTextAfterCommandExecution(TextBox textBox)
{
if (textBox == null)
{
throw new ArgumentNullException("textBox");
}
return textBox.GetValue(DefaultTextAfterCommandExecutionProperty) as string;
}
示例5: GetCommand
public static ICommand GetCommand(TextBox textBox)
{
if (textBox == null)
{
throw new ArgumentNullException("textBox");
}
return textBox.GetValue(CommandProperty) as ICommand;
}
示例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;
}
示例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;
}
示例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");
}
示例9: GetOnlyDecimal
public static bool GetOnlyDecimal(TextBox textBox)
{
return (bool)textBox.GetValue(OnlyDecimalProperty);
}
示例10: GetSelectTextOnFocus
public static SelectTextOnFocus GetSelectTextOnFocus(TextBox element) { return (SelectTextOnFocus)element.GetValue(SelectTextOnFocusProperty); }
示例11: GetSelectAllTextOnFocus
public static bool GetSelectAllTextOnFocus(TextBox textBox)
=> (bool) textBox.GetValue(SelectAllTextOnFocusProperty);
示例12: GetRealTimeText
public static string GetRealTimeText(TextBox obj)
{
return (string)obj.GetValue(RealTimeTextProperty);
}
示例13: GetUpdateTextBoxOnKeyPress
public static UpdateTextBoxOnKeyPress GetUpdateTextBoxOnKeyPress(TextBox element) { return (UpdateTextBoxOnKeyPress)element.GetValue(UpdateTextBoxOnKeyPressProperty); }
示例14: GetRollbackOnEscape
public static bool GetRollbackOnEscape(TextBox target)
{
return (bool) target.GetValue(RollbackOnEscapeProperty);
}
示例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);
}