wpf - Tab Item header styling inheritance -


i'm sure there simple i'm overlooking life of me haven't been able figure out. have started using mahapps mmetro ui has applied style of tabs. on tabs needed ability string formatting headers declared this:

<tabitem content="{binding tasklist}">     <tabitem.header>         <textblock text="{binding count, stringformat=tasks (\{0\})}" />      </tabitem.header>  </tabitem> 

tab items headers defined not inherit metro ui styling. there way apply styling headers?

unfortunately, bindingbase.stringformat used when target property of type string, tabitem.header of type object, binding directly stringformat specified fails give expected result. luckily, can use tabitem.headerstringformat property format header text while maintaining original style:

<tabitem header="{binding count}" headerstringformat="tasks ({0})" (...) /> 

mind though headerstringformat used when value of header displayed text (it ignored when header contains control etc.).


Comments

Popular posts from this blog

php - Auto increment employee ID -

php - isset function not working properly -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -