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.
it works!
thanks a lot
it seems that the designer produces much more code thant expected
when i change the resolutionorder in appstylist, it changes almost everything in what my grid looks like, because when i set a property in DisplayLayout objects, the whole object is generated with the default values in the form designer code
how can i just set one property ?
The ResolutionOrder affects the whole control. Either the control property precede the Application style or vice versa. You can control this on every individual property.
Upon further reflection, though, I wonder if this might be a bug. If you are setting the appearance of a single individual node, I would think that would take precedence over the Application style - since it's a single node.
You might want to report this to Infragistics Developer Support and let them check it out.Get Help