WebCombo introduces a default style concept to deliver optimal performance right out-of-the-box.
The default style feature offers the following benefits:
- Clean control definition during development. This significantly improves loading time in the Visual Studio 2005 designer because unnecessary style objects do not need to be created.
For instance, WebCombo version 4.0 only requires the following simple tag.
<ISWebCombo:WebCombo ID="WebCombo1" runat="server" UseDefaultStyle="true">
</ISWebCombo:WebCombo>
In previous version, WebCombo will automatically generate a lot of codes containing the styles definition in order for the WebCombo to render properly.
- Best performance in server throughput. If your end users are satisfied with the default style of WebCombo version 4.0, we highly recommend you to use the default style whenever possible. By enabling default style, the server side processing is significantly reduced because there is no need to serializing styles, validating and parsing the styles and finally generate the styles into css-based classes in the page output.
- Reduced page output size up to 70 percent. Based on a research, more than 60 percent of web developers do not modify the styles of Intersoft's control in their web application.
In the previous version of WebCombo, all styles are automatically generated to the page output regardless of whether the style is the one that comes with the control or custom style that is applied by the developer. Consider that you have 10 instances of WebCombo that use default style, the control will generate each style of each instance to the page output. This is normal behavior in the previous version since there is no mechanism that tell the controls whether the defined style is a default or a custom style.
In version 4, with the Default Style feature, WebCombo control no longer produces page-level styles for instances that enable Default Style. This mechanism enables page output reduction up to 70 percent, since styles are no longer produced regardless of the number of instances in a page.
The following illustration compares the page output between WebCombo 4.0 and its predecessors.
WebCombo 1.x - 3.x WebCombo 4.0 <style>
.WebCombo1-Row { ... }
.WebCombo1-Header { ... }
.WebCombo1-Frame { ... }
...
.WebCombo10-Row { ... }
.WebCombo10-Header { ... }
.WebCombo10-Frame { .... }
</style>
Total bytes occupied
only for style: ± 20KB<style>
/* empty */
</style>
<link rel="stylesheet"
href="/WC4Test/WebResource.axd?d=x
&t=632936740395297500"
type="text/css" />
Total bytes occupied for style: 0 KB
External style sheet size
for default style: 2KB (reusable and
cacheable for other pages)
Several important things to note around Default Style feature: -
When Default Style is enabled, WebCombo will include a link to external stylesheet that contains reusable style definition used by the Default Style. This external resource is fetched by using standard WebResource feature, and is automatically handled by WebCombo. There is no efforts required by developers.
-
When Default Style is enabled, all styles definition in the control instance should be removed. You cannot have styles definition and using default style at the same time.
-
Default Style feature is enabled by default for new instance of WebCombo 4.0. Existing instances of WebCombo (i.e. after migrated from previous version) will continue to use their existing styles definition.
To learn more about Default style, see How-to: Enable Default Style for existing instance of WebCombo.
FAQ
FAQ: What does Default Style look like?
Please refer to New User Interface topic to see the look and feel of the Default Style.
FAQ: How can I continue to use "classic WebCombo style" for new instances of WebCombo controls?
You can continue to use classic style of WebCombo by applying the classic style from predefined style. When you do so, the Default Style feature will be automatically turned off. The styles definition will be embedded back to the control since WebCombo treats any predefined styles as custom style.
To apply classic style, please follow the steps below:
- Open the SmartTag Designer Panel.
- Click on Apply Predefined Style's dropdown under Styles category.
- Choose "Default Classic".
FAQ: Can I still apply other predefined style in WebCombo.NET 4.0?
In case that the Default Style does not look suitable to your web application, you can always choose to apply one of the predefined styles that come with WebCombo.NET.
To apply a predefined style, please follow the steps below:
- Open the SmartTag Designer Panel.
- Click on the Apply Predefined Style's dropdown under Styles category.
- Choose the desired predefined style to be applied.
FAQ: What is the difference between Default Style and Predefined Style?
Default Style is a new feature in WebCombo.NET version 4.0. It is different with Predefined Style.
Default Style feature marks the instance to use the default style that comes with WebCombo.NET 4.0. You are not recommended to customize any of the styles when using Default Style feature.
Predefined Styles is a list of styles that included in WebCombo.NET designated to help developer to easily achieve stylish look and feel. Predefined style is a physical file with ISL extension, and applied from Layout Manager. You can also apply predefined style from API at runtime.
Tasks
Walkthrough Topics
FAQ and How-to Topics
References
UseDefaultStyle Property