コード例 #1
0
 private void tileView1_ItemCustomize(object sender, Views.Tile.TileViewItemCustomizeEventArgs e)
 {
     if (null == tileView1.GetRowCellValue(e.RowHandle, colemp_ids))
     {
         e.Item.Elements[0].Appearance.Normal.BackColor = Color.Linen;//行背景颜色
     }
 }
コード例 #2
0
        void tileView_ItemCustomize(object sender, Views.Tile.TileViewItemCustomizeEventArgs e)
        {
            var task = tileView.GetRow(e.RowHandle) as TaskRecord;

            if (task == null)
            {
                return;
            }
            e.Item["Label"].Appearance.Normal.BackColor = GetLabelColor(task.Label);
            e.Item["Description"].ImageVisible          = !String.IsNullOrEmpty(task.Description);
            if (IsEmptyItem(e.RowHandle))
            {
                e.Item["Caption"].Text = "Add a card...";
                e.Item.AppearanceItem.Normal.BackColor = Color.LightGray;
                e.Item.AppearanceItem.Normal.ForeColor = Color.DarkGray;
                return;
            }
            UpdateProgressElement(e.Item, task.Id.ToString());
            var elements = GetMembersElements(task.Id.ToString());

            if (elements.Count == 0)
            {
                return;
            }
            TileViewItemElement prev = null;

            foreach (var element in elements)
            {
                e.Item.Elements.Add(element);
                if (prev != null)
                {
                    element.AnchorElement   = prev;
                    element.AnchorAlignment = AnchorAlignment.Left;
                    element.AnchorIndent    = 4;
                }
                else
                {
                    element.ImageAlignment = TileItemContentAlignment.BottomRight;
                }
                prev = element;
            }
        }