This is a migrated thread and some comments may be shown as answers.
DockPanel.Image Transparency Color
4 Answers 45 Views
This is a migrated thread and some comments may be shown as answers.
Phi
Top achievements
Rank 1
Phi asked on 04 Dec 2008, 05:20 AM
I have a ShapedForm with about 8 DockPanels. I assigned images to all of them. The images look great in design mode. However, at runtime, the white background color on some of the images still showed. I could not find a way to set the Transparency color for them!

Phi

4 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 05 Dec 2008, 05:05 PM
Hello Phi,

You can use the DefaultPresenter property of the DockPanel and cast it to the DockPresenterControl. Then change its Color or BackgroundImage. Keep in mind that when making some dock/redock/autohide operations the presenter may be created again.
 

Greetings,
Julian Benkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Phi
Top achievements
Rank 1
answered on 06 Dec 2008, 07:25 PM
Sorry I did not make it very clear about my problem. I was talking about the little image/icon that showed up on the DockPanel's tabstrip.

Is there a way to control the transparency color, image location, ect for the tabstrip of the DockPanel?

Thanks,

Phi
0
Accepted
Julian Benkov
Telerik team
answered on 09 Dec 2008, 01:33 PM
Hello Phi,

You can access and use the DockableTab property of the DockPanel object.

this.dockPanel1.DockableTab.Image 

The DockableTab inherits from TabItem, where you can change other image-related properties.

Regards,
Julian Benkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Phi
Top achievements
Rank 1
answered on 09 Dec 2008, 04:13 PM
I was hoping to be able to access this via the Designer but this would do as well.

In case someone else may have similar problem, here is the code I am using:

            if (this.dockPanel.DockableTab != null)
                this.dockPanel.DockableTab.ImagePrimitive.TransparentColor = System.Drawing.Color.White;

Thanks,

Phi
Tags
Dock
Asked by
Phi
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Phi
Top achievements
Rank 1
Share this question
or