Input for WinForms
DbNavigator
外観とスタイル設定 > DbNavigator

Input provides various properties for styling the DbNavigator control, so that you can generate the Input DbNavigator as per your requirement and change the look and feel of the application you are creating.

The C1DbNavigator class provides the BackColor and ForeColor properties to set the background and foreground colors, respectively. Besides these, it also provides the Styles property to apply styling to different states of DbNavigator such as Default, Disabled, Hot, HotPressed, and Pressed.. The Styles property inherits its attributes from the classes of the C1.Win.Input.DbNavigator.Styles namespace. These classes and their purposes are briefed in the table below:

Styling classes Description
DbNavigatorStyles  Contains display attributes that determine the appearance of control.
NavBaseCustomStyle  Represents the custom styles of the navigation item.
NavBaseStyle 
Represents the styles of the navigation element.
NavButtonCustomStyle  Represents the custom styles of the button item.
NavButtonStyle  Represents the styles of the button element.
NavCommonStyle  Represents the styles for the DbNavigator control which contains display attributes that determine the general appearance of the control on the screen.
NavContentCustomStyle  Represents the custom styles of the navigation content item.
NavContentStyle  Represents the styles of the navigation content element.
NavEditorCustomStyle  Represents the custom styles of the editor item.
NavEditorStyle  Represents the styles of the editor item.
NavStateCustomStyle  Represents the custom style for element in different state.
NavStateStyle  Represents the style for element in different states.

The code snippet below depicts the use of Styles property in DbNavigator control.

C#
コードのコピー
c1DbNavigator1.Styles.Button.Border = new C1.Framework.Thickness(2, 2, 2, 2);
c1DbNavigator1.Styles.Button.Default.BackColor = System.Drawing.Color.Bisque;
c1DbNavigator1.Styles.Button.Default.BorderColor = System.Drawing.Color.Red;
c1DbNavigator1.Styles.Common.BackColor = System.Drawing.Color.AntiqueWhite;
c1DbNavigator1.Styles.Common.Border = new C1.Framework.Thickness(2, 2, 2, 2);
c1DbNavigator1.Styles.Common.BorderColor = System.Drawing.Color.Gray;
c1DbNavigator1.Styles.Common.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point);
c1DbNavigator1.Styles.Editor.Border = new C1.Framework.Thickness(2, 2, 2, 2);
c1DbNavigator1.Styles.Label.BackColor = Color.LightGray;
c1DbNavigator1.Styles.Label.BorderColor = Color.Black;