static GridCellSplitter() { Brush.Freeze(); UIElementUtils.OverrideFocusable <GridCellSplitter <TGridCellPresenter, TGridCellPanel, TGridCellCollection, TGridCell, TGridCellSplitter, TGridCellColumnController, TGridCellColumn> >(false); ControlUtils.OverrideIsTabStop <GridCellSplitter <TGridCellPresenter, TGridCellPanel, TGridCellCollection, TGridCell, TGridCellSplitter, TGridCellColumnController, TGridCellColumn> >(false); FrameworkElementUtils.OverrideVisualStyle <GridCellSplitter <TGridCellPresenter, TGridCellPanel, TGridCellCollection, TGridCell, TGridCellSplitter, TGridCellColumnController, TGridCellColumn> >(null); }
//改变主题 private void reloadView(IViewModel viewModel) { FrameworkElement preView = viewModel.View as FrameworkElement; if (preView == null) { return; } viewModel.View = null; try { FrameworkElement nextView = GetView(viewModel) as FrameworkElement; FrameworkElementUtils.Exchange(preView, nextView); } catch (Exception ex) { viewModel.View = String.Format("Failed to reload view.CurrentTheme:[{0}];CurrentLanguage:[{1}].", CurrentTheme, CurrentLanguage); throw ex; } }