In This Article

GuidEditBox Class

Represents an Guid edit box.

public class GuidEditBox : PartEditBoxBase<Guid?>
Inheritance:
object Visual UIElement FrameworkElement Control PartEditBoxBase<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

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

object:

The tooltip for the new GUID button.

NewGuidCommand

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

public ICommand NewGuidCommand { get; }

Property Value

ICommand:

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

ResolvedFormat

Gets the resolved GUID format string.

public string ResolvedFormat { get; }

Property Value

string:

The resolved GUID format string.

Methods

ConvertToString(Guid?)

Converts the specified value to a string representation.

protected override string ConvertToString(Guid? valueToConvert)
Parameter Type Description
valueToConvert Guid?

The value.

Returns

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<Guid?>:

The incremental change (spin) request that was created.

GenerateParts()

Generates the parts for the edit box.

protected override IList<IPart> GenerateParts()

Returns

IList<IPart>:

The parts that were generated.

IsValidValue(Guid?)

Returns whether the specified value is valid.

protected override bool IsValidValue(Guid? value)
Parameter Type Description
value Guid?

The value to examine.

Returns

bool:

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 KeyEventArgs

The 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, bool, out 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 string

The text.

canCoerce bool

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

value Guid?

Returns the value for the specified text.

Returns

bool:

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

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