void Initialize(swc.DataGridCell cell, swc.ComboBox control, object dataItem) { if (!IsControlInitialized(control)) { control.DataContextChanged += (sender, e) => SetValue(control.GetParent <swc.DataGridCell>(), (swc.ComboBox)sender, e.NewValue); SetControlInitialized(control, true); } SetValue(cell, control, dataItem); }
void Initialize(swc.DataGridCell cell, swc.ComboBox control, object dataItem) { var collection = new CollectionHandler { Handler = Handler }; collection.Register(Handler.Widget.DataStoreBinding.GetValue(dataItem)); control.ItemsSource = collection.Items; if (!IsControlInitialized(control)) { control.DataContextChanged += (sender, e) => SetValue(control.GetParent <swc.DataGridCell>(), (swc.ComboBox)sender, e.NewValue); SetControlInitialized(control, true); } SetValue(cell, control, dataItem); }