private void OnTabStopItemsChanged(object sender, NotifyCollectionChangedEventArgs e) { logger.I("Tab stop items collection changed!"); if (TextBoxWFElement != null) { var arrayTab = TabStopSource.ToArray(); ATBUtil.SetTextBoxTabs(TextBoxWFElement, arrayTab); } }
private void OnTabStopSourceChanged(IEnumerable <int> oldValue, IEnumerable <int> newValue) { if (oldValue != null) { ((INotifyCollectionChanged)oldValue).CollectionChanged -= new NotifyCollectionChangedEventHandler(OnTabStopItemsChanged); } if (newValue != null) { ((INotifyCollectionChanged)newValue).CollectionChanged -= new NotifyCollectionChangedEventHandler(OnTabStopItemsChanged); ((INotifyCollectionChanged)newValue).CollectionChanged += new NotifyCollectionChangedEventHandler(OnTabStopItemsChanged); } if (TextBoxWFElement != null) { var arrayTab = TabStopSource.ToArray(); ATBUtil.SetTextBoxTabs(TextBoxWFElement, arrayTab); } }