Intersoft WebCombo Documentation
UseDefaultStyle Property
See Also  Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : UseDefaultStyle Property






Indicates whether this control should use default WebCombo.NET 4.0 styles and appearance settings. Indicates whether this control should use default WebCombo.NET 4.0 styles and appearance settings. See Help for more information.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Indicates whether this control should use default WebCombo styles and appearance settings. See Help for more information.")>
<NotifyParentPropertyAttribute(True)>
<DefaultValueAttribute()>
<CategoryAttribute("Appearance")>
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
Public Property UseDefaultStyle As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As Boolean
 
instance.UseDefaultStyle = value
 
value = instance.UseDefaultStyle
C# 
[DescriptionAttribute("Indicates whether this control should use default WebCombo styles and appearance settings. See Help for more information.")]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
[CategoryAttribute("Appearance")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public bool UseDefaultStyle {get; set;}
Delphi 
public read-write property UseDefaultStyle: Boolean; 
JScript 
DescriptionAttribute("Indicates whether this control should use default WebCombo styles and appearance settings. See Help for more information.")
NotifyParentPropertyAttribute()
DefaultValueAttribute()
CategoryAttribute("Appearance")
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
public function get,set UseDefaultStyle : boolean
Managed Extensions for C++ 
[DescriptionAttribute("Indicates whether this control should use default WebCombo styles and appearance settings. See Help for more information.")]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
[CategoryAttribute("Appearance")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public: __property bool get_UseDefaultStyle();
public: __property void set_UseDefaultStyle( 
   bool value
);
C++/CLI 
[DescriptionAttribute("Indicates whether this control should use default WebCombo styles and appearance settings. See Help for more information.")]
[NotifyParentPropertyAttribute(true)]
[DefaultValueAttribute()]
[CategoryAttribute("Appearance")]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public:
property bool UseDefaultStyle {
   bool get();
   void set (    bool value);
}

Remarks

We recommend you to enable the default style feature since it offers the following benefits:

  • Clean control definition during development. This significantly improves loading time in the VS 2005 designer because unnecessary style objects do not need to be created. For instance, WebCombo.NET version 4.0 only requires the following simple tag.
    <ISWebCombo:WebCombo ID="WebCombo1" runat="server" UseDefaultStyle="true"> </ISWebCombo:WebCombo>
  • Best performance in server throughput. Using default style will significantly reduce server side processing because there is no need for 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 controls in their web application.

In previous version of WebCombo, all styles are automatically generated to the page output, regardless whether the style is the one that come with the control or custom style that applied by the developer. For example, if 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 previous version since there is no mechanism that tell the control whether the defined style is a default style or custom style.

In version 4.0, 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.

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 can’t have styles definition and using default style at the same time. 
  • Default Style feature is enabled by default for new instance of WebCombo.NET 4.0. Exisiting instances of WebCombo (i.e., after migrated from previous version) will continue to use their existing styles definition.

There are three ways to enable DefaultStyle of WebCombo:

1. SmartTag Designer.
2. Property Set.
3. WebCombo Component Designer.

For more information, you can read How-to: Enable Default Style for existing instance of WebCombo

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 come 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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.