Is there any way to change custom task pane color in VSTO outlook add in?

我与影子孤独终老i 提交于 2019-12-12 17:19:08

问题


Is there any way to change custom task pane background color in mail compose window ?

UPDATE

UserControl.BackColor gives me this result. But I want whole custom task pane to be white

My code for setting up usercontrol is here:

public partial class UserControlTest : UserControl
{
    public UserControlTest()
    {
        this.BackColor = Color.White;
        InitializeComponent();
    }
}

回答1:


You can change the background of the task panel by setting the BackColor of the UserControl.

This is how I set mine to the same color as Visual Studios dark theme:

private const string WindowColor = @"#FF2D2D30";
...
var color = ColorTranslator.FromHtml(WindowColor);
this.BackColor = Color.FromArgb(color.R, color.G, color.B);

I do this within the constructor of the UserControl before calling this.InitializeComponent();.



来源:https://stackoverflow.com/questions/37706011/is-there-any-way-to-change-custom-task-pane-color-in-vsto-outlook-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!