Esempio n. 1
0
        public BackstageViewItem()
        {
            this.OverrideStyleKey <BackstageViewItem>();

            ContentHost.SetBinding(System.Windows.Controls.ContentPresenter.ContentTemplateProperty, new Binding {
                Path = new PropertyPath(ContentTemplateProperty), Source = this
            });

            AddLogicalChild(ContentHost);
        }
Esempio n. 2
0
        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();
        }