Hello,
i use an UltraToolBar with an PopupColorPickerTool. I need to style the CustomColorBox of this tool, as u can see below.
I want to change the forecolor of the buttons "Transparent" and "More Colors..." to white. I tried with AppStylist, but found no properties for colors of the ColorBox buttons. I can accept a solution to set the background of the CustomColorBox (buttons).
I also tried to implement a CustomControl myself inheriting of the Infragistics CustomColorBox, but did not succeed - did not found the Properties..
PS: I also may want to localize it..
- Additionally i want a "No Color" button, resetting the forecolor formatting. But first of all the problem described above..
GreetingsiA. Kits
Hi Chris,
i've finally implemented the no color button, and your example worked, thanks.Greetings
The CustomColorBox is a single control, not a container control with child controls which is why the Controls collection is empty.
As a purchaser of the product, you have access to the source code for our control suite. It can be downloaded on the ‘Source Code’ tab of the My Keys and Downloads page, once you select a product.
If you’d like, you can replace the Automatic button UIElement with a new ‘Empty’ button UIElement via a creation filter. I’ve attached a sample that demonstrates how you can replace the CustomColorBoxAutomaticTrackingButtonUIElement with a CustomColorBoxSpecialButtonUIElement that uses Color.Empty.
Let me know if you need further assistance.
Chris
Hello Chris,
but even with a lazy load - i get the reference of the CustomColorBox, by the Control Property of the PopupColorPickerTool, and should be able to modify it, even without reflection. And i am able to, for example modify the ShowAutomaticColor property. But if i add a control to the Controls collection, its not displayed. And by the way, the collection is empty, where are the controls of your CustomColorBox? Do u really just paint it, and register on Click / coordinates?
In an example project i am able to modify the CustomColorBox, by adding a control to the Controls collection. But i am not able to do this in a PopupColorPickerTool.Control (CustomColorBox).
Even not with reflection:
var colorControlField = typeof(PopupColorPickerTool).GetField("colorControl", BindingFlags.NonPublic | BindingFlags.Instance);
var colorControl = colorControlField.GetValue(foreColorToolBase) as CustomColorBox; var btn = new UltraButton(); btn.Top = 2; btn.Left = 2; btn.Width = 245;
colorControl.Controls.Add(btn);
colorControlField.SetValue(foreColorToolBase, colorControl);
Or is there any way to catch the event clicked on the "automatic button" of the CustomColorBox? (I dont know in ColorChangedEvent, if it was by "automatic" or not.)
Can you provide me the source code of the CustomColorBox, or is this private?
Greetings
iA. Kits
You too.
Ok i will do that.
Have a nice weekend