Exemplo n.º 1
0
        private async void CreatureGridView_ItemClick(object sender, ItemClickEventArgs e)
        {
            GoodCreature gc = e.ClickedItem as GoodCreature;

            var contentDialog = new ContentDialog()
            {
                Content           = new GoodCreatureDialog(gc),
                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 GoodCreatureDialog(GoodCreature gc)
        {
            this.InitializeComponent();

            CreatureImage.Source = new BitmapImage(new Uri(gc.Picture));
            CreatureName.Text    = gc.Name;
            CreatureEnName.Text  = gc.EnName;
            ROG.IsChecked        = gc.IsROG;
            SW.IsChecked         = gc.IsSW;
            DST.IsChecked        = gc.IsDST;
            CreatureFresh.Text   = gc.Fresh;
            Console.Text         = gc.Console;
        }