In This Article

GuidEditBox Class

Represents an Guid edit box.

public class GuidEditBox : PartEditBoxBase<Guid?>, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control PartEditBoxBase<System.Nullable<System.Guid>> Object

Constructors

GuidEditBox()

Initializes an instance of the GuidEditBox class.

public GuidEditBox()

Properties

Format

Gets or sets the GUID format string.

public string Format { get; set; }

Property Value

System.String:

The GUID format string. The default value is "D".

NewGuidButtonToolTip

Gets or sets the tooltip for the new GUID button.

public object NewGuidButtonToolTip { get; set; }

Property Value

System.Object:

The tooltip for the new GUID button.

NewGuidCommand

Gets the System.Windows.Input.ICommand that can be used to generate a new GUID.

public ICommand NewGuidCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.ICommand that can be used to generate a new GUID.

ResolvedFormat

Gets the resolved GUID format string.

public string ResolvedFormat { get; }

Property Value

System.String:

The resolved GUID format string.

Methods

ConvertToString(Nullable<Guid>)

Converts the specified value to a string representation.

protected override string ConvertToString(Guid? valueToConvert)
Parameter Type Description
valueToConvert System.Nullable<System.Guid>

The value.

Returns

System.String:

The string representation of the specified value.

CreateIncrementalChangeRequest(IncrementalChangeRequestKind)

Creates an incremental change (spin) request.

protected override IncrementalChangeRequest<Guid?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
Parameter Type Description
kind IncrementalChangeRequestKind

The kind of request.

Returns

IncrementalChangeRequest<System.Nullable<System.Guid>>:

The incremental change (spin) request that was created.

GenerateParts()

Generates the parts for the edit box.

protected override IList<IPart> GenerateParts()

Returns

System.Collections.Generic.IList<IPart>:

The parts that were generated.

IsValidValue(Nullable<Guid>)

Returns whether the specified value is valid.

protected override bool IsValidValue(Guid? value)
Parameter Type Description
value System.Nullable<System.Guid>

The value to examine.

Returns

System.Boolean:

true if the value is valid; otherwise, false.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e System.Windows.Input.KeyEventArgs

The System.Windows.Input.KeyEventArgs that contains the event data.

RaiseValueChangedEvent()

Raises the ValueChanged event.

protected override void RaiseValueChangedEvent()

ResetValue()

Resets the value to a default value.

protected override void ResetValue()

TryConvertFromString(String, Boolean, out Nullable<Guid>)

Tries to convert the specified text to a value.

protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out Guid? value)
Parameter Type Description
textToConvert System.String

The text.

canCoerce System.Boolean

Whether the returned value should be coerced to fall within the allowed value range.

value System.Nullable<System.Guid>

Returns the value for the specified text.

Returns

System.Boolean:

true if the text was converted to a value successfully; otherwise, false.

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

System.EventHandler

Fields

FormatProperty

Identifies the Format dependency property. This field is read-only.

public static readonly DependencyProperty FormatProperty

NewGuidButtonToolTipProperty

Identifies the NewGuidButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty NewGuidButtonToolTipProperty

ResolvedFormatProperty

Identifies the ResolvedFormat dependency property. This field is read-only.

public static readonly DependencyProperty ResolvedFormatProperty

Inherited Members

Extension Methods