|
bool propertyChanged;
public MainPage()
{
InitializeComponent();
}
private void dataGrid_QueryRowHeight(object sender, QueryRowHeightEventArgs e)
{
if(propertyChanged)
{
e.Height = dataGrid.GetRowHeight(e.RowIndex);
e.Handled = true;
}
if (e.Height != dataGrid.RowHeight)
return;
if (e.RowIndex != 0)
{
//Calculates and sets the height of the row based on its content.
e.Height = dataGrid.GetRowHeight(e.RowIndex);
e.Handled = true;
}
}
private void Button_Clicked(object sender, EventArgs e)
{
propertyChanged = true;
viewModel.OrdersInfo[3].FirstName = "Modified through Button click";
dataGrid.InvalidateRowHeight(4, true);
} |