Problem:
Properties separately set for ultrabutton in the form cannot be displayed normally
Problem reproduction:
1. Create usercontrol and add ultrabutton1
2. Modify ultrabutton1 -- appearance -- backcolor to red.
3. When the project runs properly, it is found that ultrabutton1 is shown as the default light blue of defaultform.
Problem Analysis:
When a netadvantage control is created, the style of the parent form is inherited by default, so that the personal attributes of the control cannot be displayed normally.
Correction Method:
Method 1: Modify the Style File loaded by the parent form, as shown on the right.
Step 1. Open the style editor infragistics -- netadvantage -- Windows Forms -- appstylist for Windows Forms
Step 2. Open the style to be edited
Step 3. Select the control to be edited, such as ultrabutton. You can customize your own style.
Miserable-Images cannot be uploaded now
Method 2: Modify control attributes
Useappstyling = false;
Useosthemes = infragistics. Win. defaultableboolean. False;
The control does not inherit the style of the parent form by default.
Experience:
Netadvantage has the function of inheriting the style of the parent form, which is not always easy to use. Sometimes you need to create some special attributes for the interface.