Пример #1
0
        private async void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0)
            {
                return;
            }
            var listItem    = (ListViewItem)e.AddedItems[0];
            var packageType = listItem.Tag.ToString();

            var registry = PackageRegistry.GetInstance(packageType);
            var client   = new Client();

            var result = await client.GetIndexAsync(packageType);

            registry.Clear();
            registry.AddMany(result.Collection);

            addinsGrid.ItemsSource = PackageRegistry.GetInstance(packageType).All();
        }