i have a style with datatemplate in xaml page as shown below .
<
Style x:Name="mytemplate" x:Key="mytemplate" xmlns:dataprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
TargetType="dataprimitives:DataGridColumnHeader">
<Setter Property="ContentTemplate" >
<Setter.Value>
<DataTemplate>
<StackPanel Background="Aqua" Height="{Binding this.DataGridColumnHeader.Height}" Width="{Binding this.DataGridColumnHeaderWidth}" >
<TextBlock Text="{Binding}" HorizontalAlignment="Center" FontWeight="Black" ></TextBlock>
<TextBox x:Name="{Binding}" Padding="0,-1,0,0" HorizontalAlignment="Stretch" Width="100" Height="20" KeyDown="txtfilterBox_KeyDown" LostFocus="txtfilterBox_LostFocus" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
this style would be applied to the silverlight datgrid column header style. now i want the stackpanel inside the template to be same as the height and width of the silverlight datgrid column header ? so how can that be done?
else how to stretch the content template to fill the whole space of the datagrid column header