Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
When overridden in a derived class, creates a new model item that represents the value of a static member of the specified class.
Namespace: Microsoft.Windows.Design.Services
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Protected MustOverride Function CreateStaticMemberItem ( _
type As Type, _
memberName As String _
) As ModelItem
protected abstract ModelItem CreateStaticMemberItem(
Type type,
string memberName
)
protected:
virtual ModelItem^ CreateStaticMemberItem(
Type^ type,
String^ memberName
) abstract
abstract CreateStaticMemberItem :
type:Type *
memberName:string -> ModelItem
protected abstract function CreateStaticMemberItem(
type : Type,
memberName : String
) : ModelItem
Parameters
- type
Type: System.Type
The type that contains the static member being referenced.
- memberName
Type: System.String
The name of the static member being referenced.
Return Value
Type: Microsoft.Windows.Design.Model.ModelItem
A newly created model item that represents a static member of type.
Remarks
The CreateStaticMemberItem method creates a new model item that represents the value of a static member of type. For example, to add a reference to Brushes.Red to the model, call this method with typeof(Brushes) and the string "Red". This item is serialized into the following XAML.
[xaml]
{x:Static Brushes.Red}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Services Namespace