partial void OnIsDropDownOpenChangedPartial(bool oldIsDropDownOpen, bool newIsDropDownOpen) { if (_popup != null) { _popup.IsOpen = newIsDropDownOpen; } if (newIsDropDownOpen) { DropDownOpened?.Invoke(this, newIsDropDownOpen); RestoreSelectedItem(); if (SelectedItem != null) { ScrollIntoView(SelectedItem); } } else { DropDownClosed?.Invoke(this, newIsDropDownOpen); UpdateContentPresenter(); } UpdateDropDownState(); }
partial void OnIsDropDownOpenChangedPartial(bool oldIsDropDownOpen, bool newIsDropDownOpen) { // This method will load the itempresenter children #if __ANDROID__ SetItemsPresenter((_popup.Child as ViewGroup).FindFirstChild <ItemsPresenter>()); #elif __IOS__ SetItemsPresenter(_popup.Child.FindFirstChild <ItemsPresenter>()); #endif if (_popup != null) { _popup.IsOpen = newIsDropDownOpen; } if (newIsDropDownOpen) { DropDownOpened?.Invoke(this, newIsDropDownOpen); RestoreSelectedItem(); if (SelectedItem != null) { ScrollIntoView(SelectedItem); } } else { DropDownClosed?.Invoke(this, newIsDropDownOpen); UpdateContentPresenter(); } UpdateDropDownState(); }
partial void OnIsDropDownOpenChangedPartial(bool oldIsDropDownOpen, bool newIsDropDownOpen) { var(_, popupChild) = LayoutPopup(); if (_popup != null) { _popup.IsOpen = newIsDropDownOpen; } if (newIsDropDownOpen) { DropDownOpened?.Invoke(this, newIsDropDownOpen); if (popupChild != null) { popupChild.SizeChanged += PopupChildChanged; } } else { if (popupChild != null) { popupChild.SizeChanged -= PopupChildChanged; } DropDownClosed?.Invoke(this, newIsDropDownOpen); } UpdateDropDownState(); void PopupChildChanged(object snd, SizeChangedEventArgs evt) { LayoutPopup(); } }
partial void OnIsDropDownOpenChangedPartial(bool oldIsDropDownOpen, bool newIsDropDownOpen) { if (_popup != null) { _popup.IsOpen = newIsDropDownOpen; } if (newIsDropDownOpen) { DropDownOpened?.Invoke(this, newIsDropDownOpen); } else { DropDownClosed?.Invoke(this, newIsDropDownOpen); } UpdateDropDownState(); }
protected virtual void OnDropDownOpened(object e) { DropDownOpened?.Invoke(this, null !); }
/// <summary> /// Raises the <see cref="DropDownOpened"/> event. /// </summary> protected virtual void OnDropDownOpened() => DropDownOpened?.Invoke(this);
private void Popup_Opened(object sender, EventArgs e) { SearchText = string.Empty; scrollFlag = false; DropDownOpened?.Invoke(sender, new EventArgs()); }
/// <summary> /// Raises the <see cref="DropDownOpened"/> event. /// </summary> /// <param name="eventArgs"> /// <see cref="EventArgs"/> object that provides the arguments for the event. /// </param> /// <remarks> /// <strong>Notes to Inheritors:</strong><br/> /// When overriding <see cref="OnDropDownOpened"/> in a derived class, be sure to call the base class's /// <see cref="OnDropDownOpened"/> method so that registered delegates receive the event. /// </remarks> protected virtual void OnDropDownOpened(EventArgs eventArgs) { DropDownOpened?.Invoke(this, eventArgs); }
private void RaiseDropDownOpened() { DropDownOpened?.Invoke(this, EventArgs.Empty); }