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 class.

public GuidEditBox()

Properties

Format

The GUID format string.

public string Format { get; set; }

Property Value

string:

The default value is "D".

NewGuidButtonToolTip

The tooltip for the new GUID button.

public object? NewGuidButtonToolTip { get; set; }

Property Value

object

NewGuidCommand

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

public ICommand NewGuidCommand { get; }

Property Value

ICommand

ResolvedFormat

The resolved GUID format string.

public string ResolvedFormat { get; }

Property Value

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?)

Tests 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)

Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

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.

Fields

FormatProperty

Defines the Format property.

public static readonly DependencyProperty FormatProperty

NewGuidButtonToolTipProperty

Defines the NewGuidButtonToolTip property.

public static readonly DependencyProperty NewGuidButtonToolTipProperty

ResolvedFormatProperty

Defines the ResolvedFormat property.

public static readonly DependencyProperty ResolvedFormatProperty

Inherited Members

Extension Methods