Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
how to get the row height?
posted

hello

i don't set the row height,  how to get the defalut row height?  is there any property indicates the row height?

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    You can try this:

    void xamDataGrid1_Loaded(object sender, RoutedEventArgs e)

            {

                CellValuePresenter cvp = CellValuePresenter.FromRecordAndField(xamDataGrid1.Records[0] as DataRecord, xamDataGrid1.FieldLayouts[0].Fields[0]) as CellValuePresenter;

                MessageBox.Show(cvp.Field.CellHeightResolved.ToString());

     

                DataRecordPresenter drp = DataRecordPresenter.FromRecord(xamDataGrid1.Records[0]) as DataRecordPresenter;

                MessageBox.Show(drp.ActualHeight.ToString());

            }

Children
No Data