KaxInputControlFocusedStyle Property |
Namespace: Kettic.AspNet.Controls
[PersistenceModeAttribute(PersistenceMode.InnerProperty)] public InputStyle FocusedStyle { get; }
Use this property to provide a custom style for the focused KaxInput control. Common style attributes that can be adjusted include foreground color, background color, font, and alignment within the KaxInput. Providing a different style enhances the appearance of the KaxInput control.
Focused style properties in the KaxInput control are inherited from one style property to another through a hierarchy. For example, if you specify a red font for the EnabledStyle property, all other style properties in the KaxInput control will also have a red font. This allows you to provide a common appearance for the control by setting a single style property. You can override the inherited style settings for an item style property that is higher in the hierarchy by setting its style properties. For example, you can specify a blue font for the FocusedStyle property, overriding the red font specified in the EnabledStyle property.
To specify a custom style, place the <FocusedStyle> tags between the opening and closing tags of the KaxInput control. You can then list the style attributes within the opening <FocusedStyle> tag.
The following code example demonstrates how to set FocusedStyle property:
</%@ Page Language="C#" /%>
</%@ Register Assembly="KaxInput.Net2" Namespace="Kettic.AspNetControls" TagPrefix="kaxI" /%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<kaxI:KaxTextBox EmptyMessage="EmptyMessage" ID="KaxNumericTextBox1" runat="server">
<EnabledStyle BackColor="red" />
<EmptyMessageStyle BackColor="AliceBlue" />
<FocusedStyle BackColor="yellow" />
<HoveredStyle BackColor="blue" />
</kaxI:KaxTextBox>
</form>
</body>
</html>