Now imagine we had a customer request to choose and display a color with its readable name instead of integer value displayed like the one in this form, to distinguish better between the colors that look similar to each other.
To solve this issue we can use. NET named colors by creating a custom combo box control to select from those named color values. For this blog, I have created a quick and dirty combo box control, that overrides standard. NET ComboBox control and paints a rectangle of color next to it name using the. NET named color list.
This example control can be downloaded from my github repository using the link below :. Because in this blog I want to focus on managed host control on Dynamics AX environment, I will not get into the details how to create such a custom control in. NET itself. This project is basically a new Windows Forms Control Library project that overrides default combobox and uses a test form to test the control.
To be able to import it in Managed Host control, you must sign the form control assembly with a key file. For this purpose you can use the project properties to add a simple key and sign your control with it :. After that you can test by running the test form to see that your new control is running ok and export it as a DLL by doing a release build.
Now we are ready to use our new custom control in AX forms. Click here for instructions on how to enable JavaScript in your browser. Leave a Reply Cancel reply Your email address will not be published. Share via. Copy Link.
Powered by Social Snap. Copy link. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. A Windows Forms control inherits many properties form the base class System. For details about inherited properties, see System. Defining a Property Shows how to implement a property for a custom control or component and shows how to integrate the property into the design environment.
Defining Default Values with the ShouldSerialize and Reset Methods Shows how to define default property values for a custom control or component. Extending Design-Time Support Describes how to implement classes such as editors and designers that provide design-time support. How to: License Components and Controls Describes how to implement licensing in your control or component.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Developing Custom Windows Forms Controls with the.
0コメント