views:

251

answers:

0

I have the following XAML for generating a datagrid on a Silverlight page:

<UserControl 
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  
    xmlns:bubbleCreme="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.BubbleCreme"  xmlns:expressionDark="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark"  x:Class="OfferingsNotifier.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
      <bubbleCreme:BubbleCremeTheme>
        <Grid x:Name="LayoutRoot" ShowGridLines="True" Width="840" Height="480">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width=".2*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height=".2*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock x:Name="tbkTrace" Grid.Row="0" Grid.Column="1" Margin="10,10,10,10" 
                       Foreground="Black"></TextBlock>
            <data:DataGrid IsReadOnly="True" Grid.Row="1" Grid.Column="1" x:Name="gridOfferings"
                           Margin="10,10,10,10" AutoGenerateColumns="False">
                <data:DataGrid.Columns>
                    <data:DataGridTextColumn 
                        Binding="{Binding Trader}"
                        DisplayIndex="0"
                        Header="Trader" 
                        Width="Auto"
                        FontSize="11"/>
                    <data:DataGridTextColumn 
                        Binding="{Binding Product}"
                        DisplayIndex="1"
                        Header="Product" 
                        Width="Auto"
                        FontSize="11"/>
                <data:DataGridTextColumn 
                        Binding="{Binding FormattedPrice}"
                        DisplayIndex="2"
                        Header="Price" 
                        Width="Auto"
                        FontSize="11"/>
                <data:DataGridTextColumn 
                        Binding="{Binding Age}"
                        DisplayIndex="3"
                        Header="Age" 
                        Width="Auto"
                        FontSize="11"/>
            </data:DataGrid.Columns>
            </data:DataGrid>
        </Grid>
  </bubbleCreme:BubbleCremeTheme>
</UserControl>

Without the BubbleCremeTheme applied, the datagrid displays as expected. When I try to apply the theme, it applies correctly to the entire page, but the data rows of my DataGrid disappear.

How do I correctly apply the them to this entire user control without hiding the data rows?