问题
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