Exemplo n.º 1
0
 public ItemDetailPage(SampleDataItem item)
 {
     InitializeComponent();
     labelTitle.Text    = item.Title;
     labelSubtitle.Text = item.Subtitle;
     imageControl.Image = DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(item.ImagePath, typeof(ItemDetailPage).Assembly);
     labelContent.Text  = item.Content;
 }
Exemplo n.º 2
0
 public bool AddItem(SampleDataItem tile)
 {
     if (!itemsCore.Contains(tile))
     {
         itemsCore.Add(tile);
         return(true);
     }
     return(false);
 }
 public GroupItemDetailPage(SampleDataItem item, PageGroup child, int index)
 {
     InitializeComponent();
     pageGroupCore         = child;
     indexCore             = index;
     labelTitle.Text       = item.Title;
     labelSubtitle.Text    = item.Subtitle;
     imageControl.Image    = DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(item.ImagePath, typeof(ItemDetailPage).Assembly);
     labelDescription.Text = item.Description;
 }
Exemplo n.º 4
0
        public bool AddItem(SampleDataItem tile)
        {
            if (tile == null)
            {
                return(false);
            }
            string          groupName = tile.GroupName == null ? "" : tile.GroupName;
            SampleDataGroup thisGroup = GetGroup(groupName);

            if (thisGroup == null)
            {
                thisGroup = new SampleDataGroup(groupName);
                groupsCore.Add(thisGroup);
            }
            return(thisGroup.AddItem(tile));
        }
        void CreateLayoutCore(SampleDataItem item, PageGroup child, int index)
        {
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            DevExpress.XtraLayout.LayoutControlItem layoutTileItem = new DevExpress.XtraLayout.LayoutControlItem();
            GroupItemDetailPage page = new GroupItemDetailPage(item, child, index);

            page.Tag = pageGroupCore;
            layoutTileItem.Control               = page;
            layoutTileItem.Location              = new System.Drawing.Point(0, 0);
            layoutTileItem.MinSize               = new System.Drawing.Size(winLayoutControl1.Width, page.Height);
            layoutTileItem.MaxSize               = new System.Drawing.Size(0, page.Height);
            layoutTileItem.SizeConstraintsType   = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            layoutTileItem.TextSize              = new System.Drawing.Size(0, 0);
            layoutTileItem.TextToControlDistance = 0;
            layoutTileItem.TextVisible           = false;
            layoutControlGroup2.Add(layoutTileItem);
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
        }