Exemplo n.º 1
0
        ImageWithOffsetItem CreateItem(Image t)
        {
            ImageWithOffsetItem item = new ImageWithOffsetItem();
            EditValueInstance   evi  = CreateEditvalue(t);

            item.InfoImage = evi;
            return(item);
        }
Exemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            BindingList <ImageWithOffsetItem> ds = new BindingList <ImageWithOffsetItem>();
            Image          t         = CustomImageEditor.Properties.Resources.Penguins as Image;
            ImageConverter converter = new ImageConverter();

            for (int i = 0; i < 10; i++)
            {
                ImageWithOffsetItem item = CreateItem(t);
                ds.Add(item);
                dragImageEdit1.EditValue = item;
            }

            gridControl1.DataSource = ds;
            DragImagEditRepositoryItem newCustomImageEditReposioryItem = new DragImagEditRepositoryItem();

            gridControl1.RepositoryItems.Add(newCustomImageEditReposioryItem);
            (gridControl1.MainView as GridView).CalcRowHeight += Form1_CalcRowHeight;
            (gridControl1.MainView as GridView).Columns["InfoImage"].ColumnEdit = newCustomImageEditReposioryItem;
            dragImageEdit1.EditValue = CreateEditvalue(t);
            base.OnLoad(e);
        }