ModelService.CreateStaticMemberItem 메서드
파생 클래스에서 재정의하는 경우 지정된 클래스의 정적 멤버 값을 나타내는 새 모델 항목을 만듭니다.
네임스페이스: Microsoft.Windows.Design.Services
어셈블리: Microsoft.Windows.Design.Interaction(Microsoft.Windows.Design.Interaction.dll)
구문
‘선언
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
매개 변수
- type
형식: System.Type
참조되는 정적 멤버가 들어 있는 형식입니다.
- memberName
형식: System.String
참조되는 정적 멤버의 이름입니다.
반환 값
형식: Microsoft.Windows.Design.Model.ModelItem
type의 정적 멤버를 나타내는 새로 만든 모델 항목입니다.
설명
CreateStaticMemberItem 메서드는 type의 정적 멤버 값을 나타내는 새 모델 항목을 만듭니다. 예를 들어 Brushes.Red에 대한 참조를 모델에 추가하려면 typeof(Brushes) 및 "Red" 문자열을 사용하여 이 메서드를 호출합니다. 이 항목은 다음 XAML로 serialize됩니다.
[xaml]
{x:Static Brushes.Red}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.
참고 항목
참조
Microsoft.Windows.Design.Services 네임스페이스