Theme mixin

Answered
0
0

Hello,

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?

  • You must to post comments
Great Answer
0
0

Hi Guadalupe,

Following Wisej release 1.5.12, the ComponentMixin example at GitHub repository was updated with ListBox item theming.

  • You must to post comments
0
0

Hi Guadalupe,

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.

  • You must to post comments
0
0

Hello!

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.

Attachment
  • You must to post comments
0
0

Hi Guadalupe,

In our Wisej-Examples GitHub repository there is an example ComponentMixin that intends to show how to use mixins with custom appearance names for Component. For now it covers just the TreeNode case.

HTH

  • guadalupe
    Ok, thanks. I’m going to look at the ComponentMixin example.
  • You must to post comments
0
0

Hi Tiago,

Here are the two appearances for two different tree view.

 

 

  • You must to post comments
0
0

Hi Guadalupe,

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?

  • You must to post comments
0
0

HI Guadalupe,

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.

  • guadalupe
    Hi, I tried the one you attach but not worked, not applied the appearance in the treeitem and treenode. I’ll hope if there is a solution.
  • Tiago (ITG)
    The mixin I attached just changes the background colour of the TreeView area. Can you confirm it please?
  • guadalupe
    Yes, only changes the background colour of the treeview area.
  • You must to post comments
0
0

This is the simple sample, where I need to have two tree view with different appearance.

  • You must to post comments
0
0

Hi Guadalupe,

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

Snippet

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

  • guadalupe
    I set the appearance key in the properties but when I run the project does not apply the appearance. I tried to do in code but not worked. The appearance only apply in the tree, but the tree node and tree item not change.
  • Tiago (ITG)
    Please attach a small sample.
  • guadalupe
    Yes, in the next answer attach the simple sample
  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.