MLib icon indicating copy to clipboard operation
MLib copied to clipboard

Textbox in Toolbar causes exception when loading

Open sphet opened this issue 4 years ago • 1 comments

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?

sphet avatar Oct 22 '20 19:10 sphet

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?

Dirkster99 avatar Oct 26 '20 16:10 Dirkster99

You can add a style to fix him temporarily. <Style x:Key="MetroTextBox" BasedOn="{StaticResource {x:Type TextBoxBase}}" TargetType="{x:Type TextBox}"></Style>

Mjollnirs avatar Dec 29 '22 01:12 Mjollnirs