private async void PlantGridView_ItemClick(object sender, ItemClickEventArgs e) { GoodPlant gp = e.ClickedItem as GoodPlant; var contentDialog = new ContentDialog() { Content = new GoodPlantDialog(gp), PrimaryButtonText = "确定", FullSizeDesired = false }; contentDialog.Style = transparent; contentDialog.Closed += async(_s, _e) => { await GoodsGrid.Blur(value : 0, duration : 0, delay : 0).StartAsync(); contentDialog.Hide(); }; contentDialog.PrimaryButtonClick += async(_s, _e) => { await GoodsGrid.Blur(value : 0, duration : 0, delay : 0).StartAsync(); contentDialog.Hide(); }; await GoodsGrid.Blur(value : 7, duration : 100, delay : 0).StartAsync(); await contentDialog.ShowAsync(); }
public void GetImage(GoodPlant gp) { foreach (var item in gp.Creature) { PlantData.Add( new BindingImage { ImagePath = $"ms-appx:///Assets/GameResources/{item}.png" }); } }
public GoodPlantDialog(GoodPlant gp) { this.InitializeComponent(); GetImage(gp); PlantImage.Source = new BitmapImage(new Uri(gp.Picture)); PlantName.Text = gp.Name; PlantEnName.Text = gp.EnName; ROG.IsChecked = gp.IsROG; SW.IsChecked = gp.IsSW; DST.IsChecked = gp.IsDST; PlantIntroduction.Text = gp.Introduction; Console.Text = gp.Console; }