This project is read-only.

Custom UI Item Question

Nov 17, 2009 at 2:04 PM
Edited Nov 18, 2009 at 8:01 AM

I am really struggling to access a custom WPF control I am using in my Application.   The control is a ComboBox with CheckBox support which I donwloaded from the web and I have the source code I have studied the Custom UI Item Date example on the home page and I have looked at the White Combobox code but I am still confused.

I have managed to create a Custom Control in White Core and when it runs in my test harness, it is able to locatethe Custom Control instance in my application, so this part is fine.   My difficulty is to understand how to wire up the new ComboBox properties to public properties of the new White Core UI Item to return the information from the ConboBox control.

Any help would be appreciated.

One other question.  I have compiled my new control into the White Core source code.   Is this correct or is it better to locate custom controls in other locations in the White source? 

Nov 18, 2009 at 2:02 AM

There are two ways you can go about it. One is custom ui item way in which case you would have to implement all the standard combo box features in your custom item. This might be difficult. In any case you wouldn't need to add it to white source. Custom UI Item can be plugged in to white by following the standard approach shown in documentation.

Other way would be to include name space Core.UIItems.WPFUIItems and use extension methods.

Nov 18, 2009 at 6:32 AM

Thanks for the swift response.   For option 2 are you proposing that I would extend the ComboBox UIItem?

What is not clear to me is how the Get method would then find my custom control because currently it does not find it as a ComboBox only when I define it as a custom UI Element.

A little bit more info on option 2 would be appreciated.


Nov 20, 2009 at 12:12 PM

Hi viveksingh

I really would be interested to hear more on your second option to my issue if you have some time?

Nov 20, 2009 at 8:02 PM

Have a look at WPF Items section