i'm using appstylist on an ultratree but i want to change the font color programmatically
i tried
this.ultraTree1.Nodes[0].Override.NodeAppearance.ForeColor = Color.Blue;
it's not doing anything
i also tried to change the styleresourcename property
the code is in the form load event
thanks
Hello, I think you setting the wrong override. Try this one:
UltraTree1.Override.NodeAppearance.ForeColor = Color.Blue
The code you listed would (should) only change the forecolor of the first node in the tree's node collection.
Hope that helps,
Eric
Hi,
I'm pretty sure this is the intended behavior. By default, the settings you apply in AppStylist will override those on the control - at least most of the time. The reason for this is that if you have an existing application with appearances applied to it already in code and then you apply an application style, you would want the application style to take precedence. Otherwise, you would wonder why the application style wasn't working.
Fortunately, this behavior is settable. Open up your application style in AppStylist and you can go to the Component Role for the tree and you will see a property there called ResolutionOrder, which will allow you to change the order of precedence.