public BackstageViewItem() { this.OverrideStyleKey <BackstageViewItem>(); ContentHost.SetBinding(System.Windows.Controls.ContentPresenter.ContentTemplateProperty, new Binding { Path = new PropertyPath(ContentTemplateProperty), Source = this }); AddLogicalChild(ContentHost); }
public TabViewItem() { this.OverrideStyleKey <TabViewItem>(); ContentHost.SetBinding(ContentPresenter.ContentTemplateProperty, new Binding { Path = new PropertyPath(ContentTemplateProperty), Source = this }); ContentHost.SetBinding(ContentPresenter.ContentTemplateSelectorProperty, new Binding { Path = new PropertyPath(ContentTemplateSelectorProperty), Source = this }); ContentHost.SetBinding(ContentPresenter.ContentStringFormatProperty, new Binding { Path = new PropertyPath(ContentStringFormatProperty), Source = this }); SelectCommand = new RelayCommand(OnSelectCommandExecute); UpdateActualCloseCommandParameter(); }