Exemple #1
0
        protected override void OnSizeAllocated(double width, double height)
        {
            base.OnSizeAllocated(width, height);
            detailsRect  = new Rectangle(0, 0, width, BottomFrame.Bounds.Top + 20);
            expandedRect = new Rectangle(0, 0, width, height);

            if (isExpanded)
            {
                MainImage.Layout(expandedRect);
                BottomFrame.TranslationY = BottomFrame.Height;
                Title.TranslationX       = -Title.Width;
            }
            else
            {
                MainImage.Layout(detailsRect);
                BottomFrame.TranslationY = 0;
                Title.TranslationX       = 0;
            }
        }
        protected override void OnSizeAllocated(double width, double height)
        {
            base.OnSizeAllocated(width, height);
            detailsRectangle  = new Rectangle(0, 0, width, BottomFrame.Bounds.Top + 20); //アイテム表示時にメイン画像をこのRectangleにフィットさせる
            expandedRectangle = new Rectangle(0, 0, width, height);                      //アイテム非表示時.メイン画像をこのRectangleにフィットさせる

            if (isExpanded)
            {
                MainImage.Layout(expandedRectangle);
                BottomFrame.TranslationY = BottomFrame.Height;
                Title.TranslationX       = -Title.Width - 10;
            }
            else
            {
                MainImage.Layout(detailsRectangle);
                BottomFrame.TranslationY = 0;
                Title.TranslationX       = 0;
            }
        }