private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SelectorItem container = (SelectorItem)d; if (container.ParentSelector != null) { container.ParentSelector.NotifyIsSelectedChanged(container, (bool)e.NewValue); } container.UpdateVisualStates(); }
private void OnPopupOpened(object sender, EventArgs e) { if (SelectedItem != null && _selectedItemContainer == null) { _selectedItemContainer = base.ItemContainerGenerator.ContainerFromItem(SelectedItem) as SelectorItem; if (_selectedItemContainer != null) { _selectedItemContainer.IsSelected = true; _selectedItemContainer.UpdateVisualStates(); } } }