Hi,
I want to reduce the Datagrid Cell weight , i dont know how to do it please help me.....
XXAML Code.......
<DataGrid x:Name="gvaccounts" Grid.Column="0" Grid.Row="1" x:Uid="MyDataGrid" AutoGenerateColumns="False" AlternationCount="1" SelectionMode="Single" ItemsSource="{Binding Path=Table}"
SelectionUnit="FullRow" IsReadOnly="True" HeadersVisibility="Column" FontFamily="Arial" FontSize="13" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" BorderBrush="#FF04041A"
Margin="5,5,5,5" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0.5"
/>
<Setter Property="BorderBrush" Value="AliceBlue"
/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type
DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="controls:DataGridRow">
<Setter Property="Height" Value="25" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background"
Value="AliceBlue" />
<Setter Property="Foreground"
Value="Black" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background"
Value="AliceBlue" />
<Setter Property="Foreground"
Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=aid}" IsReadOnly="True" Header="#ID"
Width="0.6*" />
<DataGridTextColumn Binding="{Binding Path=Date,StringFormat=dd-MMM-yyyy}" Header="Date"
Width="1*" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Path=Spentby}" Header="Spent By"
Width="2*" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>