Intersoft WebGrid Documentation
DefaultStyleMode Property
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : DefaultStyleMode Property






Gets or sets a value that determine the mode of default style when UseDefaultStyle is enabled.

Syntax

Visual Basic (Declaration) 
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<DefaultValueAttribute()>
<DescriptionAttribute("Gets or sets a value that determine the mode of the default style when UseDefaultStyle is enabled.")>
<CategoryAttribute("Appearance")>
<NotifyParentPropertyAttribute(True)>
Public Property DefaultStyleMode As DefaultStyleKind
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim value As DefaultStyleKind
 
instance.DefaultStyleMode = value
 
value = instance.DefaultStyleMode
C# 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Gets or sets a value that determine the mode of the default style when UseDefaultStyle is enabled.")]
[CategoryAttribute("Appearance")]
[NotifyParentPropertyAttribute(true)]
public DefaultStyleKind DefaultStyleMode {get; set;}
Delphi 
public read-write property DefaultStyleMode: DefaultStyleKind; 
JScript 
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
DefaultValueAttribute()
DescriptionAttribute("Gets or sets a value that determine the mode of the default style when UseDefaultStyle is enabled.")
CategoryAttribute("Appearance")
NotifyParentPropertyAttribute()
public function get,set DefaultStyleMode : DefaultStyleKind
Managed Extensions for C++ 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Gets or sets a value that determine the mode of the default style when UseDefaultStyle is enabled.")]
[CategoryAttribute("Appearance")]
[NotifyParentPropertyAttribute(true)]
public: __property DefaultStyleKind get_DefaultStyleMode();
public: __property void set_DefaultStyleMode( 
   DefaultStyleKind value
);
C++/CLI 
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[DefaultValueAttribute()]
[DescriptionAttribute("Gets or sets a value that determine the mode of the default style when UseDefaultStyle is enabled.")]
[CategoryAttribute("Appearance")]
[NotifyParentPropertyAttribute(true)]
public:
property DefaultStyleKind DefaultStyleMode {
   DefaultStyleKind get();
   void set (    DefaultStyleKind value);
}

Remarks

The new user interface in WebGrid.NET Enterprise 5.0 enables you to choose Standard or Elegant style on DefaultStyleMode. The Classic WebGrid style has been improved to use more neutral colors. By default, Standard Style is used when the UseDefaultStyle is enabled.

The Elegant style will show you new theme and improved styles with smooth blue "Glass" appearance. This new feature will bring more comforts and new experience to end users in delivering new and improved user interface.

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, WebGrid.NET Enterprise version 5.0 only requires the following simple tag.
    <ISWebGrid:WebGrid ID="WebGrid1" runat="server"
    UseDefaultStyle="true">
    </ISWebGrid:WebGrid>
  • 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 WebGrid, 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. Assuming that you have 10 instances of WebGrid 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 5.0 with the Default Style feature, WebGrid 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 WebGrid instances in a page.

Several important things to note around Default Style feature:

  • When Default Style is enabled, WebGrid 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 WebGrid. 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 WebGrid.NET Enterprise 5.0. Existing instances of WebGrid (i.e., after migrated from previous version) will continue to use their existing styles definition.

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.