picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.62k stars 329 forks source link

Menu background #366

Open drakon660 opened 9 years ago

drakon660 commented 9 years ago

Is it possible to change menu graphics (Background etc)?

cwensley commented 9 years ago

Yes, you can do this using styles for each platform.

For example, the Windows Forms platform you'd do this:

Eto.Style.Add<Eto.WinForms.Forms.Menu.MenuBarHandler>(null, handler => handler.Control.BackColor = System.Drawing.Color.Blue);
Eto.Style.Add<Eto.WinForms.Forms.Menu.ButtonMenuItemHandler>(null, handler => handler.Control.BackColor = System.Drawing.Color.Blue);

I'm not sure that this could be implemented on each platform effectively, so it might be best as a platform-specific style.