ControlTemplate.ValidateTemplatedParent(FrameworkElement) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據一組規則檢查樣板化父系。
protected:
override void ValidateTemplatedParent(System::Windows::FrameworkElement ^ templatedParent);
protected override void ValidateTemplatedParent(System.Windows.FrameworkElement templatedParent);
override this.ValidateTemplatedParent : System.Windows.FrameworkElement -> unit
Protected Overrides Sub ValidateTemplatedParent (templatedParent As FrameworkElement)
參數
- templatedParent
- FrameworkElement
這個範本所套用的元素。
例外狀況
那 templatedParent 個一定不是 null。
你必須先設定ControlTemplate屬性,然後再將 ControlTemplate 與 關聯ControlTemplateControl。
備註
此方法使用以下規則:
不
templatedParent可能是類型 FrameworkContentElement。不
templatedParent可能是非 的型別FrameworkElementControl。不
templatedParent可能是 Control 與 無關聯 ControlTemplate的 。