获得XamDataGrid 中, 自定义CellValuePresenter中的控件的方法 - 记号

 DependencyObject source = e.OriginalSource as DependencyObject; if (source == null) return; DataRecordPresenter drp = Infragistics.Windows.Utilities.GetAncestorFromType(source, typeof(DataRecordPresenter), true) as DataRecordPresenter; CellValuePresenter cvp = CellValuePresenter.FromRecordAndField(drp.DataRecord, drp.DataRecord.FieldLayout.Fields[0]); ListBox lstSource = Infragistics.Windows.Utilities.GetDescendantFromName(cvp, "lstWorkUnit") as ListBox; ListBox lstTarget = Infragistics.Windows.Utilities.GetDescendantFromName(cvp, "lstSelectedUnit") as ListBox; var a = Infragistics.Windows.Utilities.GetDescendantFromType(cvp, typeof(XamTextEditor), false);

你可能感兴趣的:(null)