好的,谢谢。
还有个问题,就是我在xaml里面能否应用主题?目前看来Flexsheet的默认主题是C1Blue,如何用数据绑定的方式或者直接在xaml里应用其他主题?
示例里面是在后台代码里应用的:
- private void cmbTheme_SelectedItemChanged(object sender, PropertyChangedEventArgs<object> e)
- {
- var theme = C1ThemeFactory.GetTheme((C1AvailableThemes)cmbTheme.SelectedItem);
- C1Theme.ApplyTheme(LayoutRoot, theme);
- var adornerLayer = AdornerLayer.GetAdornerLayer(LayoutRoot);
- if (adornerLayer != null)
- {
- // this will aplly theme to everything displayed in adorner, including any C1Window instances
- C1Theme.ApplyTheme(adornerLayer, theme);
- }
- gallery.CurrentTheme = theme;
- }
复制代码
|