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
Phi
4 Answers, 1 is accepted
0
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.
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
Is there a way to control the transparency color, image location, ect for the tabstrip of the DockPanel?
Thanks,
Phi
0
Accepted
Hello Phi,
You can access and use the DockableTab property of the DockPanel object.
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.
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
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