更新 : 2007 年 11 月
指定した型が、指定した子の型の親として使用できるかどうかを判断します。
名前空間 : Microsoft.Windows.Design.Model
アセンブリ : Microsoft.Windows.Design.Extensibility (Microsoft.Windows.Design.Extensibility.dll 内)
構文
'宣言
Public Shared Function CanParent ( _
context As EditingContext, _
parent As ModelItem, _
childType As Type _
) As Boolean
'使用
Dim context As EditingContext
Dim parent As ModelItem
Dim childType As Type
Dim returnValue As Boolean
returnValue = ModelParent.CanParent(context, _
parent, childType)
public static bool CanParent(
EditingContext context,
ModelItem parent,
Type childType
)
public:
static bool CanParent(
EditingContext^ context,
ModelItem^ parent,
Type^ childType
)
public static function CanParent(
context : EditingContext,
parent : ModelItem,
childType : Type
) : boolean
パラメータ
context
型 : Microsoft.Windows.Design.EditingContext使用する編集コンテキスト。
parent
型 : Microsoft.Windows.Design.Model.ModelItem親。
childType
型 : System.Type子とする項目の型。
戻り値
型 : System.Boolean
指定した parent 項目が、childType のインスタンスを子として受け入れることができる場合は true。それ以外の場合は false。
解説
このメソッドは、指定した parent 項目が childType 型を子として受け入れることができる場合は、true を返します。このメソッドが true を返す場合、その後の Parent メソッドの呼び出しにより、parent が childType の親として設定されます。
アクセス許可
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。
参照
参照
Microsoft.Windows.Design.Model 名前空間