Completed
Last Updated: 13 Apr 2021 11:56 by ADMIN
Release R2 2021
Marco
Created on: 16 Mar 2021 08:41
Category: PictureBox
Type: Bug Report
1
RadPictureBox: transparency is lost after pasting an image with a transparent background

Steps to reproduce:

1. Copy an image with a transparent background to the Clipboard

2. Paste it in RadPictureBox.

As a result you will notice that the transparency is lost.

Note: it is possible to handle clicking the Paste menu item and control what image exactly to be pasted:

        public RadForm1()
        {
            InitializeComponent(); 

            this.radPictureBox1.ContextMenuItemClick += RadPictureBox1_ContextMenuItemClick;
        }

        private void RadPictureBox1_ContextMenuItemClick(object sender, HandledEventArgs e)
        {
            if (sender == this.radPictureBox1.ContextMenuProperties.PasteItem)
            {
                e.Handled = true;
                // Image extractedImage = // get image with transparency; 
                // this.radPictureBox1.Image = extractedImage;
            }
        }

0 comments