I tried to use Mixin Themes to define some new colors and appearance keys for the treeview. I put the mixin theme file in the “Themes”. But the Tree Node and the tree item not apply the new appearance. How I can to do for apply the new appearance in all items and nodes for the treeview?
I attach back your sample fixed. Luca pointed out what was wrong. As referred previously in this thread, please have a look at the mixin example at GitHub as it documents the steps needed to make a mixin.
I am currently trying to reply the example of the component mixin here show, but I have not been successful.
I would like to know what I am doing wrong, thanks.
Adjunct my sample.
There is a workaround but it’s not that easy to do and use. Maybe it’s easier to do it another way.
I understand you want to use two different appearances on two different TreeViews. Can you please send a screen shots of each appearance so we can evaluate easier alternatives?
In fact the Tree appearance is using the definition in the mixin file. Try the one I attach. The problema is a bit different: you can not set the AppearanceKey on a TreeNode. This means that your definitions “mytree-file” and “mytree-folder” aren’t used anywhere.
TreeNode is a Component and not a Control. As Wisej is now, only Controls have the AppearanceKey property.
I’ll check whether there is a workaround.
There is a mixin example in GitHub. This example overrides how standard controls look, their appearance; it overrides an appearance by using the same appearance name. Otherwise you have the to explicitly set the control’s AppearanceKey on the Properties property grid or like this
this.comboBox.AppearanceKey = "My-ComboBox";
Please note the appearance name is case sensitive.
All the appearance name on your mixin file are custom names like “my…”. In order to use the mixin file as it is you have to set the AppearanceKey on each control. Otherwise you have to change the appearance names. Please note that as explained in the README.md file,
2. The appearance name doesn’t always match the control name. The appearance name for the ListBox control is “list”. (…)
I suggest you use ThemeBuilder to make sure about the appearance name of each control.
By the way, the README.md file will be updated to clarify this matter
Please login first to submit.