void AttachToolbarEvents(SearchBar bar) { bar.Changed += (o, e) => { SearchEntryChanged?.Invoke(o, e); }; bar.KeyPressed += (o, e) => { SearchEntryKeyPressed?.Invoke(o, e); }; bar.LostFocus += (o, e) => { SearchEntryLostFocus?.Invoke(o, e); }; bar.SelectionActivated += (o, e) => { SearchEntryActivated?.Invoke(o, e); }; bar.LostFocus += (sender, e) => { exitAction?.Invoke(); }; }
void AttachToolbarEvents(SearchBar bar) { bar.PerformCommand += (o, e) => { PerformCommand?.Invoke(o, e); }; bar.KeyPressed += (o, e) => { SearchEntryChanged?.Invoke(o, e); }; bar.LostFocus += (o, e) => { SearchEntryLostFocus?.Invoke(o, e); }; bar.SelectionActivated += (o, e) => { SearchEntryActivated?.Invoke(o, e); }; bar.LostFocus += (sender, e) => { exitAction?.Invoke(Gtk.DirectionType.TabForward); }; }