ModelService.CreateStaticMemberItem(Type, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new model item that represents the value of a static member of the given class.
protected:
abstract System::Activities::Presentation::Model::ModelItem ^ CreateStaticMemberItem(Type ^ type, System::String ^ memberName);
protected abstract System.Activities.Presentation.Model.ModelItem CreateStaticMemberItem (Type type, string memberName);
abstract member CreateStaticMemberItem : Type * string -> System.Activities.Presentation.Model.ModelItem
Protected MustOverride Function CreateStaticMemberItem (type As Type, memberName As String) As ModelItem
Parameters
- type
- Type
The type that contains the static member being referenced.
- memberName
- String
The name of the static member being referenced.
Returns
Returns ModelItem.
Remarks
For example, to add a reference to Brushes.Red
to the model, call this method with typeof(Brushes)
and the string "Red" as the parameters. This will be serialized into XAML as {x:Static Brushes.Red}
.