Ejemplo n.º 1
0
        private void BangumiRankView_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
        {
            CartoonView nv = args.ItemContainer.ContentTemplateRoot as CartoonView;

            if (nv != null)
            {
                if (DiveRect == null || DiveRect.Width <= 0)
                {
                    SetDiveRect();
                }
                nv.Width  = DiveRect.Width / 3 - 25;
                nv.Height = nv.Width * 6 / 3;
                nv.Margin = new Thickness(10, 0, 5, 0);
                nv.AddData(args.Item as AcContent);
            }
        }
Ejemplo n.º 2
0
        private void NewBangumiGridView_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
        {
            CartoonView nv = args.ItemContainer.ContentTemplateRoot as CartoonView;

            if (!CateisTV)
            {
                //var s = NewBangumiGridView.ItemTemplate;
                if (nv != null)
                {
                    if (DiveRect == null || DiveRect.Width <= 0)
                    {
                        SetDiveRect();
                    }
                    nv.Width  = DiveRect.Width / 3 - 25;
                    nv.Height = nv.Width * 6 / 3;
                    nv.Margin = new Thickness(10, 0, 5, 0);
                    nv.AddData(args.Item as AcContent);
                }
            }
            else
            {
                var nov = args.ItemContainer.ContentTemplateRoot as CartoonView;
                if (nov != null)
                {
                    if (DiveRect == null || DiveRect.Width <= 0)
                    {
                        SetDiveRect();
                    }
                    nov.Width  = DiveRect.Width / 3 - 25;
                    nov.Height = nov.Width + 20;
                    nov.Margin = new Thickness(10, 0, 5, 0);
                    //nov.AddAllData(args.Item as AcContent);
                    nov.AddTVData(args.Item as AcContent);
                }
            }
        }