Show / Hide Table of Contents

Class TextBoxTimeSpanMaskingBehavior

A masking behavior to only allow entering of TimeSpans.

Inheritance
object
DispatcherObject
DependencyObject
Freezable
Animatable
Behavior
Behavior<TextBox>
TextBoxMaskingBehaviorBase
TextBoxTimeSpanMaskingBehavior
Implements
IAnimatable
IAttachedObject
TextBoxMaskingBehaviorBase.IsTextBoxClearingAllowed
TextBoxMaskingBehaviorBase.IsTextBoxClearingAllowedProperty
TextBoxMaskingBehaviorBase.OnAttached()
TextBoxMaskingBehaviorBase.OnDetaching()
Behavior<TextBox>.AssociatedObject
Behavior.CreateInstanceCore()
Behavior.Attach(DependencyObject)
Behavior.Detach()
Behavior.AssociatedType
Animatable.ApplyAnimationClock(DependencyProperty, AnimationClock)
Animatable.ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)
Animatable.BeginAnimation(DependencyProperty, AnimationTimeline)
Animatable.BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)
Animatable.Clone()
Animatable.FreezeCore(bool)
Animatable.GetAnimationBaseValue(DependencyProperty)
Animatable.HasAnimatedProperties
Freezable.CloneCore(Freezable)
Freezable.CloneCurrentValue()
Freezable.CloneCurrentValueCore(Freezable)
Freezable.CreateInstance()
Freezable.Freeze()
Freezable.Freeze(Freezable, bool)
Freezable.GetAsFrozen()
Freezable.GetAsFrozenCore(Freezable)
Freezable.GetCurrentValueAsFrozen()
Freezable.GetCurrentValueAsFrozenCore(Freezable)
Freezable.OnChanged()
Freezable.OnFreezablePropertyChanged(DependencyObject, DependencyObject)
Freezable.OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)
Freezable.OnPropertyChanged(DependencyPropertyChangedEventArgs)
Freezable.ReadPreamble()
Freezable.WritePostscript()
Freezable.WritePreamble()
Freezable.CanFreeze
Freezable.IsFrozen
Freezable.Changed
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Equals(object)
DependencyObject.GetHashCode()
DependencyObject.GetLocalValueEnumerator()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.InvalidateProperty(DependencyProperty)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, object)
DependencyObject.SetValue(DependencyProperty, object)
DependencyObject.SetValue(DependencyPropertyKey, object)
DependencyObject.ShouldSerializeProperty(DependencyProperty)
DependencyObject.DependencyObjectType
DependencyObject.IsSealed
DispatcherObject.Dispatcher
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Controls.Behaviors
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class TextBoxTimeSpanMaskingBehavior : TextBoxMaskingBehaviorBase, IAnimatable, IAttachedObject
Examples

The following example illustrates how to use the TextBoxTimeSpanMaskingBehavior to restrict the user input to exclusively allowing a TimeSpan.

<StackPanel Orientation="Horizontal">
    <SAF:Caption Style="{SAF:Style CaptionContentBox}"
                 Text="Enter the timespan" />
    <TextBox Style="{SAF:Style TextBoxSingleLine}"
             Text="{Binding TimeSpan}"
             Width="150">
        <b:Interaction.Behaviors>
            <SAF:TextBoxTimeSpanMaskingBehavior />
        </b:Interaction.Behaviors>
    </TextBox>
</StackPanel>

Constructors

View Source

TextBoxTimeSpanMaskingBehavior()

Creates a new instance of the TextBoxTimeSpanMaskingBehavior class.

Declaration
public TextBoxTimeSpanMaskingBehavior()

Methods

View Source

IsValid(string)

Checks whether the valueToValidate matches the pattern to be valid.

Declaration
public override bool IsValid(string valueToValidate)
Parameters
Type Name Description
string valueToValidate

The value for validation.

Returns
Type Description
bool

True if the value is valid, otherwise false.

Overrides
TextBoxMaskingBehaviorBase.IsValid(string)

Implements

IAnimatable
Microsoft.Xaml.Behaviors.IAttachedObject

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
DependencyObjectExtensions.XamlClone<T>(T)
DependencyObjectExtensions.FindAncestor<T>(DependencyObject)
DependencyObjectExtensions.FindFirstChildByType<T>(DependencyObject)
DependencyObjectExtensions.FindLogicalAncestor<T>(DependencyObject)
DependencyObjectExtensions.GetChildrenByType<T>(DependencyObject)
DependencyObjectExtensions.GetContainer(DependencyObject)
DependencyObjectExtensions.SetContainer(DependencyObject, CompositionContainer)
  • View Source
Back to top Generated by DocFX