Bewerken

Share via


SelectionRangeConverter.CreateInstance Method

Definition

Creates a SelectionRange object by using the specified type descriptor and set of property values for that object.

public:
 override System::Object ^ CreateInstance(System::ComponentModel::ITypeDescriptorContext ^ context, System::Collections::IDictionary ^ propertyValues);
public override object CreateInstance (System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues);
public override object CreateInstance (System.ComponentModel.ITypeDescriptorContext? context, System.Collections.IDictionary propertyValues);
override this.CreateInstance : System.ComponentModel.ITypeDescriptorContext * System.Collections.IDictionary -> obj
Public Overrides Function CreateInstance (context As ITypeDescriptorContext, propertyValues As IDictionary) As Object

Parameters

context
ITypeDescriptorContext

A ITypeDescriptorContext that provides a format context.

propertyValues
IDictionary

An IDictionary that contains the new property values.

Returns

If successful, the newly created SelectionRange; otherwise, this method throws an exception.

Exceptions

propertyValues is null or its Start and End elements could not be converted into a SelectionRange.

Remarks

Use the CreateInstance method to make changes to an existing immutable object by creating a modified version of it. This method expects the propertyValues parameter to have elements with key values of Start and End, each with the corresponding DateTime value.

Applies to

See also