AccentColor property

Aug 20, 2013 at 9:09 PM
Edited Aug 20, 2013 at 9:10 PM
Hello,

I know this may be sort of a newb question, so bare with me.

I am trying to set the accent color of a MUI window. I have seen examples how to do this in code, such as:
If Windows.Application.Current Is Nothing Then
    Dim app As New Windows.Application
    app.Resources("AccentColor") = System.Windows.Media.Colors.Green
End If

newGUI = New NewGUI.ConfigWindow
newGUI.Show()
Unfortunately, I cannot get this to work, and nothing happens.

I was also wondering if there was a way to set the AccentColor property directly in XAML, or through a custom MUI Window property, instead of from code directly. I may want several windows different colors.

If not possible, could someone provide me a way to do this in code properly?

Thanks,
  • Jake M.
Edit:

This is a project calling and creating a window from a separate project, if this is an issue.
Coordinator
Aug 21, 2013 at 5:01 PM
You can override the accent color in your app.xaml like so;
<Color x:Key="AccentColor">#e51400</Color>
Please note that mui resources (including accent color) are app-wide, not per-window.
Aug 21, 2013 at 8:36 PM
Works great thanks :).