Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • Guygeboe

    Guygeboe

    Member

    93 Points

    38 Posts

    Re: A data grid with borders

    May 07, 2008 01:45 PM | LINK

    Hi,

     

    I'm getting this error :(.

    I got a datagrid thats in a different xaml file, thats because I made it a control.

    This is the error:

    A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.dll
    Additional information: Invalid attribute value System_Windows_Controls:DataGridColumnHeader for property TargetType. [Line: 6 Position: 99]

    These are the first lines of the datagrid control:

    <Grid x:Name="DataGridMedewerkerOverzicht" Background="White" >

    <System_Windows_Controls:DataGrid ColumnHeaderStyle="{StaticResource columnHeaderStyle}" HeadersVisibility="Column"

    x:Name="dg" AutoGenerateColumns="False" VerticalAlignment="Top" d:LayoutOverrides="Height" Margin="0,0,-97.4440002441406,0" Height="25.134">

    <System_Windows_Controls:DataGrid.Columns>

    I put the style in my app.xaml, thats the only location I found where it was accepted.

    <Application.Resources>

    <Style x:Key="columnHeaderStyle" TargetType="System_Windows_Controls:DataGridColumnHeader">

    <Setter Property="Template">

    <Setter.Value> and so on....

    Can anyone help me? Thx! :)