void OnControlSelectionChanged(object sender, WSelectionChangedEventArgs e) { bool areEqual = false; if (Element.SelectedItem != null && Element.SelectedItem.GetType().IsValueType) { areEqual = Element.SelectedItem.Equals(List.SelectedItem); } else { areEqual = Element.SelectedItem == List.SelectedItem; } if (!areEqual) { if (_itemWasClicked) { List.SelectedItem = Element.SelectedItem; } else { ((IElementController)Element).SetValueFromRenderer(ListView.SelectedItemProperty, List.SelectedItem); } } _itemWasClicked = false; }
void OnControlSelectionChanged(object sender, WSelectionChangedEventArgs e) { if (Element != null) { Element.SelectedIndex = Control.SelectedIndex; } }
void OnControlSelectionChanged(object?sender, WSelectionChangedEventArgs e) { if (VirtualView != null && PlatformView != null) { VirtualView.SelectedIndex = PlatformView.SelectedIndex; } }
private void ItemFilter_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e) { var updatedItems = (from item in _allItems where string.IsNullOrWhiteSpace(ItemFilter.SelectedValue.ToString()) || ItemFilter.SelectedValue.ToString() == "All" || ItemFilter.SelectedValue.ToString() == item.MediaType.ToString() select item).ToList(); ItemList.ItemsSource = updatedItems; }
private void OnViewTypeComboboxSelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e) { if (viewtypecombobox.SelectedValue != null) { if (viewtypecombobox.SelectedValue.ToString() == "TimelineMonth") { this.scheduler.TimelineViewSettings.TimeIntervalSize = 150; } else { this.scheduler.TimelineViewSettings.TimeIntervalSize = 50; } } }
void OnSelectionChanged(object sender, WSelectionChangedEventArgs e) { if (Element == null) return; Page page = e.AddedItems.Count > 0 ? (Page)e.AddedItems[0] : null; Page currentPage = Element.CurrentPage; if (currentPage == page) return; currentPage?.SendDisappearing(); Element.CurrentPage = page; UpdateSelectedTabColors(); page?.SendAppearing(); }
void OnSelectionChanged(object sender, WSelectionChangedEventArgs e) { if (_fromUpdate) { return; } var page = (ContentPage)SelectedItem; ContentPage currentPage = Element.CurrentPage; if (currentPage == page) { return; } currentPage?.SendDisappearing(); Element.CurrentPage = page; page?.SendAppearing(); }
void OnSelectionChanged(object sender, WSelectionChangedEventArgs e) { if (!_ignoreSelectionEvent) { foreach (object item in e.AddedItems) { if (item is Cell cell) { if (cell.IsEnabled) { Element.Model.RowSelected(cell); } break; } } } if (Control == null) { return; } Control.SelectedItem = null; }
void FormsComboBoxSelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e) { MinWidth = 0; }