DependencyProperty.Register Metoda

Definice

Vytvoří nové instance, které DependencyProperty mají konkrétní inicializační podmínky.Creates new instances of the DependencyProperty possessing specific initialization conditions.

Přetížení

Register(String, Type, Type)

Inicializuje novou instanci DependencyProperty třídy, která má vlastnosti parametrizované podle vstupních parametrů.Initializes a new instance of the DependencyProperty class that has the properties parameterized according to the input parameters.

Register(String, Type, Type, PropertyMetadata)

Inicializuje novou instanci DependencyProperty třídy, která má vlastnosti parametrizované podle vstupních parametrů.Initializes a new instance of the DependencyProperty class that has the properties parameterized according to the input parameters.

Register(String, Type, Type)

Inicializuje novou instanci DependencyProperty třídy, která má vlastnosti parametrizované podle vstupních parametrů.Initializes a new instance of the DependencyProperty class that has the properties parameterized according to the input parameters.

public:
 static System::Workflow::ComponentModel::DependencyProperty ^ Register(System::String ^ name, Type ^ propertyType, Type ^ ownerType);
public static System.Workflow.ComponentModel.DependencyProperty Register (string name, Type propertyType, Type ownerType);
static member Register : string * Type * Type -> System.Workflow.ComponentModel.DependencyProperty
Public Shared Function Register (name As String, propertyType As Type, ownerType As Type) As DependencyProperty

Parametry

name
String

Název procesu DependencyProperty.The name of the DependencyProperty.

propertyType
Type

Type hodnota, kterou může vlastnost obsahovat.Type of the value that the property can contain.

ownerType
Type

Vlastník Type vlastnosti závislostiOwner Type of the dependency property.

Návraty

DependencyProperty

DependencyPropertyTřída, která má vlastnosti Parametrizovaná podle vstupních parametrů.The DependencyProperty class that has the properties parameterized according to the input parameters.

Příklady

Následující příklad ukazuje, jak zaregistrovat DependencyProperty pro použití pomocí DependencyObject .The following example shows how to register a DependencyProperty for use by a DependencyObject. Tento příklad kódu je součástí ukázky pro odeslání e-mailu sady SDK a pochází ze souboru SendMailActivity. cs.This code example is part of the Send Email SDK Sample and is from the SendMailActivity.cs file. Další informace najdete v tématu odeslání aktivity pošty.For more information, see Send Mail Activity.

// Define the DependencyProperty objects for all of the Properties
// ...and Events exposed by this activity
public static DependencyProperty FromProperty = DependencyProperty.Register("From", typeof(string), typeof(SendEmailActivity), new PropertyMetadata("someone@example.com"));
public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(string), typeof(SendEmailActivity), new PropertyMetadata("someone@example.com"));
' Define the DependencyProperty objects for all of the Properties 
' ...and Events exposed by me activity
Public Shared FromEmailProperty As DependencyProperty = DependencyProperty.Register("From", GetType(String), GetType(SendEmailActivity), New PropertyMetadata("someone@example.com"))
Public Shared ToProperty As DependencyProperty = DependencyProperty.Register("To", GetType(String), GetType(SendEmailActivity), New PropertyMetadata("someone@example.com"))

Platí pro

Register(String, Type, Type, PropertyMetadata)

Inicializuje novou instanci DependencyProperty třídy, která má vlastnosti parametrizované podle vstupních parametrů.Initializes a new instance of the DependencyProperty class that has the properties parameterized according to the input parameters.

public:
 static System::Workflow::ComponentModel::DependencyProperty ^ Register(System::String ^ name, Type ^ propertyType, Type ^ ownerType, System::Workflow::ComponentModel::PropertyMetadata ^ defaultMetadata);
public static System.Workflow.ComponentModel.DependencyProperty Register (string name, Type propertyType, Type ownerType, System.Workflow.ComponentModel.PropertyMetadata defaultMetadata);
static member Register : string * Type * Type * System.Workflow.ComponentModel.PropertyMetadata -> System.Workflow.ComponentModel.DependencyProperty
Public Shared Function Register (name As String, propertyType As Type, ownerType As Type, defaultMetadata As PropertyMetadata) As DependencyProperty

Parametry

name
String

Název procesu DependencyProperty.The name of the DependencyProperty.

propertyType
Type

Type hodnota, kterou může vlastnost obsahovat.Type of the value the property can contain.

ownerType
Type

Vlastník Type vlastnosti závislostiOwner Type of the dependency property.

defaultMetadata
PropertyMetadata

Další možnosti vlastností.Additional property options.

Návraty

DependencyProperty

DependencyPropertyTřída, která má vlastnosti Parametrizovaná podle vstupních parametrů.The DependencyProperty class that has the properties parameterized according to the input parameters.

Platí pro