or
GridViewColumn[] columns =
new
[]
{
new
GridViewDataColumn()
{Header =
"Test header"
}
};
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
Grid.Columns.Clear();
Grid.Columns.AddRange(columns);
}
<
ComboBox
DisplayMemberPath
=
"Descrizione"
SelectedValuePath
=
"Codice"
Style
=
"{StaticResource ComboBoxStyle}"
Width
=
"140"
HorizontalAlignment
=
"Left"
ItemsSource
=
"{Binding Source={StaticResource commonProperties}, Path=Content.UnitaOrganizzative,Mode=TwoWay}"
SelectedValue
=
"{Binding SelectedItem.Codice, Mode=TwoWay}"
SelectedIndex
=
"{Binding SelectedItem.Padre}"
VerticalAlignment
=
"Top"
/>