Beispiel #1
0
        protected override object LoadDlgContent()
        {
            StackPanel sp     = new StackPanel();
            TabHeader  header = new TabHeader();

            header.Owner = this;
            sp.Children.Add(header);
            ContentPresenter content = new ContentPresenter()
            {
                VerticalAlignment   = VerticalAlignment.Stretch,
                HorizontalAlignment = HorizontalAlignment.Stretch,
            };
            Binding contentBinding = new Binding()
            {
                Path = new PropertyPath("SelectedContent"), Source = this
            };

            content.SetBinding(ContentPresenter.ContentProperty, contentBinding);
            sp.Children.Add(content);
            return(sp);
        }