コード例 #1
0
        private static object CurrentPagePropertyChanged(DependencyObject d, object baseValue)
        {
            ApplicationPage currentPage          = (ApplicationPage)d.GetValue(CurrentPageProperty);
            ViewModelBase   currentPageViewModel = (ViewModelBase)d.GetValue(CurrentPageViewModelProperty);

            var pageHost = (d as PageHost).MainFrame;

            pageHost.Content = currentPage.ToBasePage(currentPageViewModel);

            return(baseValue);
        }