共用方式為


AdornerProperties.SetModel 方法

會設定與指定之裝飾項相關聯的模型項目。

命名空間:  Microsoft.Windows.Design.Interaction
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Public Shared Sub SetModel ( _
    adorner As DependencyObject, _
    value As ModelItem _
)
public static void SetModel(
    DependencyObject adorner,
    ModelItem value
)
public:
static void SetModel(
    DependencyObject^ adorner, 
    ModelItem^ value
)
static member SetModel : 
        adorner:DependencyObject * 
        value:ModelItem -> unit 
public static function SetModel(
    adorner : DependencyObject, 
    value : ModelItem
)

參數

例外狀況

例外狀況 條件
ArgumentNullException

adorner 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

備註

這個裝飾項與對應至模型項目的檢視相關聯。

.NET Framework 安全性

請參閱

參考

AdornerProperties 類別

Microsoft.Windows.Design.Interaction 命名空間

ModelItem

AdornerPanel

其他資源

逐步解說:建立設計階段裝飾項

裝飾項架構