<local:Foo x:Key="Foo"/>
Background="{Binding Instance.Color, Source={StaticResource Foo}}"
private bool _b;
public Form1()
{
InitializeComponent();
button1.MouseEnter += (sender, args) => _b = true;
button1.MouseLeave += (sender, args) => _b = false;
button1.Paint += (sender, args) =>
{
if (_b)
args.Graphics.DrawRectangle(new Pen(Color.Red), 0, 0, ((Button)sender).Width - 1,
((Button)sender).Height - 1);
};
}