Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Theme.Manager.SetTheme exceptions and questions
posted

Hi, we're evaluating your WPF 15.2 product and have a few issues and questions.

In our app we have several xamdatagrids (about 14 at one time in a tab control) and we want to allow the users to change the theme for all the grids at once.

1. When applying a theme through:
Theme.Manager.SetTheme(xamDataGridName, new MetroTheme());

The following exceptions are raised:

A first chance exception of type: 'System.NotSupportedException' occured in PresentationFramework.dll
A first chance exception of type: 'System.Xaml.XamlObjectWriterException' occured in system.Xaml.dll

Why is this happening and what can be done about this issue? With 14 grids we get this exception about 84 times...

2.Performance - applying themes to all grids it takes about 20+ seconds. During this time the UI freezes up since it appears that Theme.Manager.SetTheme is running on the UI Thread. How can this time be improved? Can the themes be applied asynchronously or through databinding? If so, a basic sample with be greatly appreciated.

3. What's the recommended way to clear a theme?

If we in XAML set the metro theme for a xamdatagrid as such:

Theme="Metro" but then we want to clear the theme and we call Theme.Manager.SetTheme(xamDataGridName, null);

The theme does not get cleared.

Parents Reply Children
No Data