Home Forums WPF controls Xceed DataGrid for WPF New Themes Question

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23079 |

    What am I missing here. I set up a quick test to try out the new themes:

    Here is my markup:
    <Window x:Class=”DataGridTheming.Test”
    xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
    xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
    xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid&#8221;
    Title=”DataGridThemingTest” Height=”700″ Width=”1000″
    >
    <Grid>
    <xcdg:DataGridControl x:Name=”MenuGrid” >
    <xcdg:DataGridControl.View>
    <xcdg:TableView>
    <xcdg:TableView.Theme>
    <xcdg:Office2007BlueTheme/>
    </xcdg:TableView.Theme>
    </xcdg:TableView>
    </xcdg:DataGridControl.View>
    </xcdg:DataGridControl>
    </Grid>
    </Window>

    Here is my code behind:

    public partial class Test : System.Windows.Window {

    public Test() {
    InitializeComponent();
    MenuDALC dalc = new MenuDALC(ConfigurationManager.ConnectionStrings[“menu.generator”].ConnectionString);
    DataGridCollectionViewSource dgcvs1 = new DataGridCollectionViewSource();
    dgcvs1.Source = dalc.GetAllMenus();
    MenuGrid.ItemsSource = dgcvs1.View;
    }

    }

    It throws this error when I try to build & run:
    An unhandled exception of type ‘System.Windows.Markup.XamlParseException’ occurred in PresentationFramework.dll

    Additional information: Cannot create instance of ‘Test’ defined in assembly ‘DataGridTheming, Version=1.0.2692.24144, Culture=neutral, PublicKeyToken=null’. Exception has been thrown by the target of an invocation. Error in markup file ‘Test.xaml’ Line 1 Position 9.

    However, if I change the Office2007BlueTheme to AeroNormalColorTheme everything works great.

    Thanks,
    Doug

    Imported from legacy forums. Posted by Douglas (had 3416 views)

    Xceed Support
    Member
    Post count: 5658

    The new themes are packaged into a new assembly called “Xceed.Wpf.DataGrid.ThemePack.1”. Was this assembly included in your application’s reference?

    Imported from legacy forums. Posted by Marcus [Xceed] (had 230 views)

    User (Old forums)
    Member
    Post count: 23064

    In visual studio I did add reference, and put it in there in the beginning.

    Right now I have added that and the Xceed.Wpf.DataGrid

    In my code behind I have these references
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Shapes;
    using Xceed.Wpf.DataGrid;
    using System.Configuration;

    You can see my markup references in my first post

    Imported from legacy forums. Posted by Douglas (had 481 views)

    Xceed Support
    Member
    Post count: 5658

    you can try removing all Xceed references and re-adding them:

    – Xceed.Wpf.Controls
    – Xceed.Wpf.DataGrid
    – Xceed.Wpf.DataGrid.ThemePack.1

    If this still doesn’t work, I’d like to have more details on the exception…

    To do that, you would need to go in the menu: Debug\Exceptions

    In the Exceptions window, press the “Add…” button, then select the “Common Language Runtime Exceptions” category and type “System.Windows.Markup.XamlParseException”, then press “OK”.

    Finally ensure the “Thrown” checkbox is checked for the XamlParseException.

    The application should now break whenever the error occurs, and the details from the exception should be much more meaningfull.

    Waiting for your feedback.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 252 views)

    User (Old forums)
    Member
    Post count: 23064

    Nice tip on the exception thing. I reliazed it wasn’t working because I’m not a vanguard subscriber 🙁 duh……

    Imported from legacy forums. Posted by Douglas (had 4504 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.