Example #1
0
        private static void SetupHeader(IViewModel viewModel, TabItem tabItem)
        {
            var supportHeader = viewModel as ISupportHeader;

            if (supportHeader == null)
            {
                return;
            }

            var headerViewModel = supportHeader.Header;

            if (headerViewModel == null)
            {
                return;
            }

            var tabControlHeaderViewModel = new TabControlHeaderViewModel(supportHeader);
            var tabControlHeaderView      = tabControlHeaderViewModel.GetViewAndBind();

            tabItem.Header = tabControlHeaderView;
        }
Example #2
0
        private static void SetupHeader(IViewModel viewModel, TabItem tabItem)
        {
            var supportHeader = viewModel as ISupportHeader;

            if (supportHeader == null)
            {
                return;
            }

            var headerViewModel = supportHeader.Header;

            if (headerViewModel == null)
            {
                return;
            }

            var tabControlHeaderViewModel = new TabControlHeaderViewModel(supportHeader);
            var tabControlHeaderView      = ViewService.CreateView(tabControlHeaderViewModel.GetType());

            ViewService.BindViewModel(tabControlHeaderView, tabControlHeaderViewModel);

            tabItem.Header = tabControlHeaderView;
        }