コード例 #1
0
        protected override SizeF MeasureOverride(SizeF availableSize)
        {
            CardViewItem parent = this.Parent as CardViewItem;

            if (parent == null)
            {
                return(base.MeasureOverride(availableSize));
            }
            return(parent.GetEditorSize(availableSize).Size);
        }
コード例 #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);
            RadCardView            control  = this.ElementTree.Control as RadCardView;
            CardListViewVisualItem ancestor = this.FindAncestor <CardListViewVisualItem>();
            CardViewItem           parent   = this.Parent as CardViewItem;

            if (control == null || ancestor == null || parent == null)
            {
                return;
            }
            if (parent.CardField != null)
            {
                parent.CardField.Current = true;
            }
            if (this.Editor != null)
            {
                return;
            }
            control.SelectedItem = ancestor.Data;
            ancestor.EditingItem = parent;
            control.ListViewElement.BeginEdit();
        }