コード例 #1
0
        void OnItemSelected(object?sender, TSelectedItemChangedEventArgs e)
        {
            _ = Element ?? throw new InvalidOperationException($"{nameof(Element)} should have been set by base class.");

            _lastSelected = e.SelectedItem as Element;
            ((IShellController)Element).OnFlyoutItemSelected(_lastSelected);
        }
コード例 #2
0
ファイル: TVShellSectionHandler.cs プロジェクト: sung-su/maui
        void OnItemSelected(object?sender, TSelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null)
            {
                return;
            }

            var content = e.SelectedItem;

            if (ShellSection.CurrentItem != content)
            {
                ShellSection.SetValueFromRenderer(ShellSection.CurrentItemProperty, content);
            }
        }
コード例 #3
0
 static void OnItemSelected(object sender, TSelectedItemChangedEventArgs e)
 {
     (sender as ItemTemplateAdaptor)?.SendItemSelected(e.SelectedItem);
 }