views:

604

answers:

1

Hi, i would like to replace the following xaml code :

<Custom:DataGridTextColumn Header=" " Width="*"/>in codebehind. This xaml code fills my header to the end with my style..

this is what i want to get

|name | number | this area uses "mystyle" end of grid ->|

this is what i now get :

|name | number | unstyled area! end of grid ->|

as u see, i would like to fill the unstyled area with my style, done this with xaml: now need in cb pls ;)

A: 
tc.Width = New DataGridLength(1.0, DataGridLengthUnitType.Auto);
qntmfred
ive already tried this, it doesnt work. for example if i resize the grid with the table in it , the header grows but without the style.
mikemuhl
well, my answer only addresses the column width part. as for the style, which style did you want to apply? you can set dataGrid.Style, dataGrid.ColumnHeaderStyle, dataGridTextColumn.ElementStyle or dataGridTextColumn.CellStyle
qntmfred