Usercontrol containing a datagrid

Jul 8, 2009 at 7:29 AM

Hi,

I'd like to make a usercontrol like

<Grid>

<ToolBarTray Grid.Row=0>

<DataGrid Grid.Row=1>

</Grid>

 

To this usercontrol I'd like to pass the DataGrid Columns for the datagrid within the usercontrol

like

 

<custom:myUserControl>

<custom:DataGridTextColumn
Binding="{Binding Path=myFirstBinding}" Header="FirstColumn" />
<custom:DataGridTextColumn
Binding="{Binding Path=mySecondBinding}" Header="SecondColumn" />

</custom:myUserControl>

 

Has anyone an idea how I can achieve this?

Your help is appreciated,

Regards,

Matthieu de Graaf