I am using the Windows8Touch theme with custom colors I generated via the Theme color generator application It works well. Except for one thing. In the File Open dialog, no matter what I do, I cannot get one of the text labels -- just the one -- to honor any of the colors I set.
It is the label at the bottom of the dialog that says "File Name" (at least when English is the language). It is next to an edit box that shows the file name. No matter what I do, that little label always shows up as black. I have attached an image showing what I mean. The label that I cannot color is circled in red in the image
So I have two questions:
1. Is there some Palette color I can set in the Windows8Touch theme that will make this little label get colored correctly -- without forcing me to write a style or control template?
2. If not, and I am forced to restyle the control myself, then in what part of of what control template or style do I change something? (Note that I have tried already - copying the DialogWindowTemplate et al and setting both Foreground and TextElement.Foreground in a few places but I cannot figure out where it would go)
If it matters, here are the custom colors I am using:
And here is my initialization code where I set up the Windows8TouchPaele
It is the label at the bottom of the dialog that says "File Name" (at least when English is the language). It is next to an edit box that shows the file name. No matter what I do, that little label always shows up as black. I have attached an image showing what I mean. The label that I cannot color is circled in red in the image
So I have two questions:
1. Is there some Palette color I can set in the Windows8Touch theme that will make this little label get colored correctly -- without forcing me to write a style or control template?
2. If not, and I am forced to restyle the control myself, then in what part of of what control template or style do I change something? (Note that I have tried already - copying the DialogWindowTemplate et al and setting both Foreground and TextElement.Foreground in a few places but I cannot figure out where it would go)
If it matters, here are the custom colors I am using:
<
Color
x:Key
=
"GsBackgroundDarkColor"
>#002B35</
Color
>
<
Color
x:Key
=
"GsForegroundLightColor"
>#FFFFFFFF</
Color
>
<
Color
x:Key
=
"GsMediumColor"
>#FFC0C0C0</
Color
>
<
Color
x:Key
=
"GsLowColor"
>#758595</
Color
>
<
Color
x:Key
=
"GsHighColor"
>#FFBDBDC2</
Color
>
<
Color
x:Key
=
"GsAccentColor"
>#FF26A0DA</
Color
>
<!-- This is the standard Windows8Touch accent color-->
<
Color
x:Key
=
"GsEffectHighColor"
>#92376472</
Color
>
<
Color
x:Key
=
"GsEffectLowColor"
>#FF1E2D3A</
Color
>
And here is my initialization code where I set up the Windows8TouchPaele
var palette = Windows8TouchPalette.Palette;
palette.FontSizeXXL = UserSettings.FontSizeTitle;
palette.FontSizeXL = UserSettings.FontSizeHeader;
palette.FontSizeL = UserSettings.FontSize;
palette.FontSize = UserSettings.FontSizeMedium;
palette.FontSizeS = UserSettings.FontSizeSmall;
palette.FontFamily =
new
FontFamily(
"Segoe UI"
);
if
(Application.Current.TryFindResource(
"GsBackgroundDarkColor"
)
is
not Color backColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find background color"
);
}
else
{
palette.MainColor = backColor;
palette.InvertedForegroundColor = backColor;
}
if
(Application.Current.TryFindResource(
"GsForegroundLightColor"
)
is
not Color foreColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find foreground light color"
);
}
else
{
palette.MainForegroundColor = foreColor;
palette.InvertedColor = foreColor;
}
if
(Application.Current.TryFindResource(
"GsLowColor"
)
is
not Color lowColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsLowColor"
);
}
else
{
palette.LowColor = lowColor;
}
if
(Application.Current.TryFindResource(
"GsMediumColor"
)
is
not Color medColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsMediumColor"
);
}
else
{
palette.MediumColor = medColor;
}
if
(Application.Current.TryFindResource(
"GsHighColor"
)
is
not Color highColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsHighColor"
);
}
else
{
palette.HighColor = highColor;
}
if
(Application.Current.TryFindResource(
"GsAccentColor"
)
is
not Color accentColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsAccentColor"
);
}
else
{
palette.AccentColor = accentColor;
}
if
(Application.Current.TryFindResource(
"GsEffectLowColor"
)
is
not Color effectLowColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find GsEffectLowColor"
);
}
else
{
palette.EffectLowColor = effectLowColor;
}
if
(Application.Current.TryFindResource(
"GsEffectHighColor"
)
is
not Color effectHighColor)
{
Debug.Assert(
false
);
Log.Error(
"Failed to find effectHighColor"
);
}
else
{
palette.EffectLowColor = effectHighColor;
}
var theme =
new
Windows8TouchTheme();
StyleManager.ApplicationTheme = theme;