MLib
MLib copied to clipboard
Textbox in Toolbar causes exception when loading
I have a TextBox inside a Toolbar, and I get the exception
System.Windows.Markup.XamlParseException: 'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.'
Exception: Cannot find resource named 'MetroTextBox'. Resource names are case sensitive.
Looking at the xaml I see:
Toolbar.xaml line 60:
But MetroTextBox does not exist. It seems like the theming for Toolbars is maybe incomplete? Combo boxes in toolbars seem to have different colors than when in a horizontal stack panel. Any thoughts?
I am not sure about this one - I never used a textbox in a toolbar so I don't think I ever came across this one - I cannot verify your problem either because I don't have your code - can you isolate the problem in a small test client (or using a modified one of the test clients in the repository) so I can have a look at it?
You can add a style to fix him temporarily.
<Style x:Key="MetroTextBox" BasedOn="{StaticResource {x:Type TextBoxBase}}" TargetType="{x:Type TextBox}"></Style>