三省堂 大辞林 |
スタイル 2 [style]
「―のいい人」
(2)服装や髪形。デザイン。
「古い―の洋服」
(3)工業製品の型。デザイン。
「斬新な―の車」
(4)文章の様式。表現形式や表現手法。文体。
「個性的な―の文章」
(5)美術・建築・音楽などの表現様式。時代・流派・作家・作品に特有の形式や手法。
「古典的―」「ロココ-―」
(6)個人・階層・社会に特有な行動の仕方や考え方。
HTML4.01 リファレンス |
style インラインにおけるスタイルシートの設定
| 機能と値 | HTML * | Windows | Macintosh |
| ・スタイルシートで定義されている属性 | ○ | IE3,4,5,6 NS4,6 | IE3,4,5 NS4,6 |
<style> 〜 </style> スタイルシート
| 属性の機能と値 | DTD ※ | |
| type | MIMEタイプ: スタイルシートの MIMEタイプを指定する | ◎ |
| media | メディアタイプ: スタイルシートが出力の対象とするメディアを指定する カンマで区切ることで複数のメディアを列記することもできる。 デフォルト値は 「 screen」となっている |
○ |
.NET Framework クラス ライブラリ リファレンス |
Style イベント
Style クラス
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文Public Class Style Implements IParserAccessor, ITemplateable, IStateManager, ICloneable
Dim instance As Style
public class Style : IParserAccessor, ITemplateable, IStateManager, ICloneable
public ref class Style : IParserAccessor, ITemplateable, IStateManager, ICloneable
public class Style implements IParserAccessor, ITemplateable, IStateManager, ICloneable
public class Style implements IParserAccessor, ITemplateable, IStateManager, ICloneable
解説基本クラスとしての Style には、すべてのモバイル コントロールに共通するスタイル特性が格納されます。Style クラスから継承されたクラスには、それらに関連付けられているコントロールに固有の付加的なスタイル特性が格納されます。
モバイル コントロールでサポートされるデバイスは多岐にわたるため、どのスタイル プロパティもあくまでアドバイザリとしてのプロパティです。これらのプロパティを実装すべきかどうかは、対象デバイスの機能によって異なります。
使用例3 つのユーザー定義スタイルを 1 つの StyleSheet オブジェクトに整理する例を次に示します。この 3 つのスタイルに対応する 3 つの値が SelectionList オブジェクトに保持されます。OnClick コマンド イベントが発生すると、SelectStyle 関数が呼び出されます。この関数は、TextView オブジェクトの StyleReference プロパティを変更します。
<%@ Page Language="VB" Inherits="System.Web.UI.MobileControls.MobilePage" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <script runat="server"> Private Sub SelectStyle(ByVal sender As Object, _ ByVal e As EventArgs) ' Retrieve the style name as a string Dim myStyle As String = SelectionList1.Selection.ToString() ' Match the style name and apply the style to TextView1 Select Case myStyle Case "hot" TextView1.StyleReference = "Style1" Case "medium" TextView1.StyleReference = "Style2" Case "mild" TextView1.StyleReference = "Style3" End Select End Sub </script> <html > <body> <mobile:StyleSheet id="StyleSheet1" runat="server"> <mobile:Style font-size="Large" font-name="Arial" font-bold="true" forecolor="red" font-italic="true" backcolor="#E0E0E0" wrapping="wrap" name="Style1"> </mobile:Style> <mobile:Style font-size="Normal" font-name="Arial" font-bold="false" forecolor="Blue" font-italic="true" backcolor="blue" wrapping="NoWrap" name="Style2"> </mobile:Style> <mobile:Style font-size="Small" font-name="Arial Narrow" font-bold="false" forecolor="Green" font-italic="false" backcolor="Green" wrapping="NoWrap" name="Style3"> </mobile:Style> </mobile:StyleSheet> <mobile:form id="Form1" runat="server"> <mobile:Label id="Label1" runat="server" Text="Today's Special" StyleReference="title" /> <mobile:TextView id="TextView1" runat="server" StyleReference="Style1"> Chili </mobile:TextView> <mobile:SelectionList runat="server" id="SelectionList1"> <item Text="hot" Value="hot"/> <item Text="medium" Value="medium"/> <item Text="mild" Value="mild"/> </mobile:SelectionList> <mobile:Command ID="Command1" runat="server" Text="Select Style" OnClick="SelectStyle" /> </mobile:form> </body> </html>
<%@ Page Language="C#" Inherits="System.Web.UI.MobileControls.MobilePage" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <script runat="server"> void SelectStyle(object sender, EventArgs e) { // Retrieve the style name as a string. String myStyle = SelectionList1.Selection.ToString(); // Match the style name and apply the style to TextView1. switch (myStyle) { case "hot": TextView1.StyleReference = "Style1"; break; case "medium": TextView1.StyleReference = "Style2"; break; case "mild": TextView1.StyleReference = "Style3"; break; } } </script> <html > <body> <mobile:StyleSheet id="StyleSheet1" runat="server"> <mobile:Style font-size="Large" font-name="Arial" font-bold="true" forecolor="red" font-italic="true" backcolor="#E0E0E0" wrapping="wrap" name="Style1"> </mobile:Style> <mobile:Style font-size="Normal" font-name="Arial" font-bold="false" forecolor="Blue" font-italic="true" backcolor="blue" wrapping="NoWrap" name="Style2"> </mobile:Style> <mobile:Style font-size="Small" font-name="Arial Narrow" font-bold="false" forecolor="Green" font-italic="false" backcolor="Green" wrapping="NoWrap" name="Style3"> </mobile:Style> </mobile:StyleSheet> <mobile:form id="Form1" runat="server"> <mobile:Label id="Label1" runat="server" Text="Today's Special" StyleReference="title" /> <mobile:TextView id="TextView1" runat="server" StyleReference="Style1"> Chili </mobile:TextView> <mobile:SelectionList runat="server" id="SelectionList1"> <item Text="hot" Value="hot"/> <item Text="medium" Value="medium"/> <item Text="mild" Value="mild"/> </mobile:SelectionList> <mobile:Command runat="server" Text="Select Style" OnClick="SelectStyle" /> </mobile:form> </body> </html>
.NET Framework のセキュリティ
継承階層System.Web.UI.MobileControls.Style
System.Web.UI.MobileControls.PagerStyle
スレッド セーフ
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Style クラス
アセンブリ: System.Web (system.web.dll 内)
構文Public Class Style Inherits Component Implements IStateManager
Dim instance As Style
public class Style : Component, IStateManager
public class Style extends Component implements IStateManager
public class Style extends Component implements IStateManager
解説Style クラスは、Web サーバー コントロールの外観を制御するプロパティをカプセル化し、複数の Web サーバー コントロールに適用して共通の外観を指定できます。コントロールの背景色とフォントの色を指定するには、BackColor プロパティと ForeColor プロパティをそれぞれ設定します。境界線を表示できるコントロールで、境界線の幅、境界線スタイル、および境界線の色を制御するには、BorderWidth、BorderStyle、BorderColor の各プロパティをそれぞれ設定します。Web サーバー コントロールのサイズは、Height プロパティと Width プロパティを使用して指定することもできます。
使用例この例では、Style オブジェクトを使用して、複数のコントロールのスタイル プロパティを一度に変更する方法を示します。Style プロパティのいずれかの値を変更するたびに、各コントロールはその ApplyStyle メソッドを呼び出す必要があります。含まれているすべてのコントロールが、ここに示すすべてのプロパティをサポートするわけではありません。特定のプロパティをサポートしないコントロールの場合、そのプロパティの値が変更されても、そのコントロールの外観は変わりません。
メモ |
|---|
| 次のコード サンプルはシングルファイル コード モデルを使用しており、分離コード ファイルに直接コピーされた場合は正常に動作しない可能性があります。このコード サンプルは、拡張子が .aspx の空のテキスト ファイルにコピーする必要があります。Web フォームのコード モデルの詳細については、「ASP.NET Web ページのコード モデル」を参照してください。 |
<%@ Page language="VB" AutoEventWireup="true" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Data" %> <html> <head> <script runat="server"> Private Dim primaryStyle As New Style() Sub Page_Load(sender As Object, e As System.EventArgs) If Not Page.IsPostBack Then ' Add data to the borderColorList, ' backColorList, and foreColorList controls. Dim colors As New ListItemCollection() colors.Add(Color.Black.Name) colors.Add(Color.Blue.Name) colors.Add(Color.Green.Name) colors.Add(Color.Orange.Name) colors.Add(Color.Purple.Name) colors.Add(Color.Red.Name) colors.Add(Color.White.Name) colors.Add(Color.Yellow.Name) borderColorList.DataSource = colors borderColorList.DataBind() backColorList.DataSource = colors backColorList.DataBind() foreColorList.DataSource = colors foreColorList.DataBind() ' Add data to the borderStyleList control. Dim styles As New ListItemCollection() Dim styleType As Type = GetType(BorderStyle) Dim s As String For Each s in [Enum].GetNames(styleType) styles.Add(s) Next s borderStyleList.DataSource = styles borderStyleList.DataBind() ' Add data to the borderWidthList control. Dim widths As New ListItemCollection() Dim i As Integer for i = 0 To 10 widths.Add(i.ToString() & "px") Next i borderWidthList.DataSource = widths borderWidthList.DataBind() ' Add data to the fontNameList control. Dim names As New ListItemCollection() names.Add("Arial") names.Add("Courier") names.Add("Garamond") names.Add("Time New Roman") names.Add("Verdana") fontNameList.DataSource = names fontNameList.DataBind() ' Add data to the fontSizeList control. Dim fontSizes As New ListItemCollection() fontSizes.Add("Small") fontSizes.Add("Medium") fontSizes.Add("Large") fontSizes.Add("10pt") fontSizes.Add("14pt") fontSizes.Add("20pt") fontSizeList.DataSource = fontSizes fontSizeList.DataBind() ' Set primaryStyle as the style for each control. Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End If End Sub Sub ChangeBorderColor(sender As Object, e As System.EventArgs) primaryStyle.BorderColor = _ Color.FromName(borderColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBackColor(sender As Object, e As System.EventArgs) primaryStyle.BackColor = _ Color.FromName(backColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeForeColor(sender As Object, e As System.EventArgs) primaryStyle.ForeColor = _ Color.FromName(foreColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBorderStyle(sender As Object, e As System.EventArgs) primaryStyle.BorderStyle = _ CType([Enum].Parse(GetType(BorderStyle), _ borderStyleList.SelectedItem.Text), BorderStyle) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBorderWidth(sender As Object, e As System.EventArgs) primaryStyle.BorderWidth = _ Unit.Parse(borderWidthList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeFont(sender As Object, e As System.EventArgs) primaryStyle.Font.Name = _ fontNameList.SelectedItem.Text Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeFontSize(sender As Object, e As System.EventArgs) primaryStyle.Font.Size = _ FontUnit.Parse(fontSizeList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub </script> </head> <body> <form id="Form1" runat="server"> <table cellPadding="6" border="0"> <tr> <td> <asp:label id="Label1" Text="Border Properties Example" Runat="server"> <center><br>Label Styles</center> </asp:label> </td> <td> <asp:button id="Button1" runat="server" Text="Button Styles"> </asp:button> </td> <td> <asp:listbox id="ListBox1" Runat="server"> <asp:ListItem Value="0" Text="List Item 0"> </asp:ListItem> <asp:ListItem Value="1" Text="List Item 1"> </asp:ListItem> <asp:ListItem Value="2" Text="List Item 2"> </asp:ListItem> </asp:listbox> </td> <td> <asp:textbox id="TextBox1" Text="TextBox Styles" Runat="server"> </asp:textbox> </td> <td> <asp:table id="Table1" Runat="server"> <asp:TableRow> <asp:TableCell Text="(0,0)"></asp:TableCell> <asp:TableCell Text="(0,1)"></asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell Text="(1,0)"></asp:TableCell> <asp:TableCell Text="(1,1)"></asp:TableCell> </asp:TableRow> </asp:table> </td> </tr> <tr> <td> <asp:Label Runat="server" Text="Border Color:"> </asp:Label> <asp:dropdownlist id="borderColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Style:"> </asp:Label> <asp:dropdownlist id="borderStyleList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderStyle"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Width"> </asp:Label> <asp:dropdownlist id="borderWidthList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderWidth"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Back Color:"> </asp:Label> <asp:dropdownlist id="backColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBackColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Foreground Color:"> </asp:Label> <asp:dropdownlist id="foreColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeForeColor"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Font Name:"> </asp:Label> <asp:dropdownlist id="fontNameList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFont"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Font Size:"> </asp:Label> <asp:dropdownlist id="fontSizeList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFontSize"> </asp:dropdownlist> </td> </tr> </table> </form> </body> </html>
<%@ Page language="C#" AutoEventWireup="true" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Data" %> <html> <head> <script runat="server"> private Style primaryStyle = new Style(); void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { // Add data to the borderColorList, // backColorList, and foreColorList controls. ListItemCollection colors = new ListItemCollection(); colors.Add(Color.Black.Name); colors.Add(Color.Blue.Name); colors.Add(Color.Green.Name); colors.Add(Color.Orange.Name); colors.Add(Color.Purple.Name); colors.Add(Color.Red.Name); colors.Add(Color.White.Name); colors.Add(Color.Yellow.Name); borderColorList.DataSource = colors; borderColorList.DataBind(); backColorList.DataSource = colors; backColorList.DataBind(); foreColorList.DataSource = colors; foreColorList.DataBind(); // Add data to the borderStyleList control. ListItemCollection styles = new ListItemCollection(); Type styleType = typeof(BorderStyle); foreach (string s in Enum.GetNames(styleType)) { styles.Add(s); } borderStyleList.DataSource = styles; borderStyleList.DataBind(); // Add data to the borderWidthList control. ListItemCollection widths = new ListItemCollection(); for (int i = 0; i < 11; i++) { widths.Add(i.ToString() + "px"); } borderWidthList.DataSource = widths; borderWidthList.DataBind(); // Add data to the fontNameList control. ListItemCollection names = new ListItemCollection(); names.Add("Arial"); names.Add("Courier"); names.Add("Garamond"); names.Add("Time New Roman"); names.Add("Verdana"); fontNameList.DataSource = names; fontNameList.DataBind(); // Add data to the fontSizeList control. ListItemCollection fontSizes = new ListItemCollection(); fontSizes.Add("Small"); fontSizes.Add("Medium"); fontSizes.Add("Large"); fontSizes.Add("10pt"); fontSizes.Add("14pt"); fontSizes.Add("20pt"); fontSizeList.DataSource = fontSizes; fontSizeList.DataBind(); //Set primaryStyle as the style for each control. Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } } void ChangeBorderColor(object sender, System.EventArgs e) { primaryStyle.BorderColor = Color.FromName(borderColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBackColor(object sender, System.EventArgs e) { primaryStyle.BackColor = Color.FromName(backColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeForeColor(object sender, System.EventArgs e) { primaryStyle.ForeColor = Color.FromName(foreColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBorderStyle(object sender, System.EventArgs e) { primaryStyle.BorderStyle = (BorderStyle)Enum.Parse(typeof(BorderStyle), borderStyleList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBorderWidth(object sender, System.EventArgs e) { primaryStyle.BorderWidth = Unit.Parse(borderWidthList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeFont(object sender, System.EventArgs e) { primaryStyle.Font.Name = fontNameList.SelectedItem.Text; Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeFontSize(object sender, System.EventArgs e) { primaryStyle.Font.Size = FontUnit.Parse(fontSizeList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } </script> </head> <body> <form id="Form1" runat="server"> <table cellPadding="6" border="0"> <tr> <td> <asp:label id="Label1" Text="Border Properties Example" Runat="server"> <center><br>Label Styles</center> </asp:label> </td> <td> <asp:button id="Button1" runat="server" Text="Button Styles"> </asp:button> </td> <td> <asp:listbox id="ListBox1" Runat="server"> <asp:ListItem Value="0" Text="List Item 0"> </asp:ListItem> <asp:ListItem Value="1" Text="List Item 1"> </asp:ListItem> <asp:ListItem Value="2" Text="List Item 2"> </asp:ListItem> </asp:listbox> </td> <td> <asp:textbox id="TextBox1" Text="TextBox Styles" Runat="server"> </asp:textbox> </td> <td> <asp:table id="Table1" Runat="server"> <asp:TableRow> <asp:TableCell Text="(0,0)"></asp:TableCell> <asp:TableCell Text="(0,1)"></asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell Text="(1,0)"></asp:TableCell> <asp:TableCell Text="(1,1)"></asp:TableCell> </asp:TableRow> </asp:table> </td> </tr> <tr> <td> <asp:Label Runat="server" Text="Border Color:"> </asp:Label> <asp:dropdownlist id="borderColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Style:"> </asp:Label> <asp:dropdownlist id="borderStyleList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderStyle"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Width"> </asp:Label> <asp:dropdownlist id="borderWidthList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderWidth"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Back Color:"> </asp:Label> <asp:dropdownlist id="backColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBackColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Foreground Color:"> </asp:Label> <asp:dropdownlist id="foreColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeForeColor"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Font Name:"> </asp:Label> <asp:dropdownlist id="fontNameList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFont"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Font Size:"> </asp:Label> <asp:dropdownlist id="fontSizeList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFontSize"> </asp:dropdownlist> </td> </tr> </table> </form> </body> </html>
.NET Framework のセキュリティ
継承階層System.MarshalByRefObject
System.ComponentModel.Component
System.Web.UI.WebControls.Style
派生クラス
スレッド セーフ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Style コンストラクタ ()
アセンブリ: System.Web (system.web.dll 内)
構文Dim instance As New Style
解説
使用例この例では、Style オブジェクトを使用して、複数のコントロールのスタイル プロパティを一度に変更する方法を示します。Style プロパティのいずれかの値を変更するたびに、各コントロールはその ApplyStyle メソッドを呼び出す必要があります。含まれているすべてのコントロールが、ここに示すすべてのプロパティをサポートするわけではありません。特定のプロパティをサポートしないコントロールの場合、そのプロパティの値が変更されても、そのコントロールの外観は変わりません。
メモ |
|---|
| 次のコード サンプルはシングルファイル コード モデルを使用しており、分離コード ファイルに直接コピーされた場合は正常に動作しない可能性があります。このコード サンプルは、拡張子が .aspx の空のテキスト ファイルにコピーする必要があります。Web フォームのコード モデルの詳細については、「ASP.NET Web ページのコード モデル」を参照してください。 |
<%@ Page language="VB" AutoEventWireup="true" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Data" %> <html> <head> <script runat="server"> Private Dim primaryStyle As New Style() Sub Page_Load(sender As Object, e As System.EventArgs) If Not Page.IsPostBack Then ' Add data to the borderColorList, ' backColorList, and foreColorList controls. Dim colors As New ListItemCollection() colors.Add(Color.Black.Name) colors.Add(Color.Blue.Name) colors.Add(Color.Green.Name) colors.Add(Color.Orange.Name) colors.Add(Color.Purple.Name) colors.Add(Color.Red.Name) colors.Add(Color.White.Name) colors.Add(Color.Yellow.Name) borderColorList.DataSource = colors borderColorList.DataBind() backColorList.DataSource = colors backColorList.DataBind() foreColorList.DataSource = colors foreColorList.DataBind() ' Add data to the borderStyleList control. Dim styles As New ListItemCollection() Dim styleType As Type = GetType(BorderStyle) Dim s As String For Each s in [Enum].GetNames(styleType) styles.Add(s) Next s borderStyleList.DataSource = styles borderStyleList.DataBind() ' Add data to the borderWidthList control. Dim widths As New ListItemCollection() Dim i As Integer for i = 0 To 10 widths.Add(i.ToString() & "px") Next i borderWidthList.DataSource = widths borderWidthList.DataBind() ' Add data to the fontNameList control. Dim names As New ListItemCollection() names.Add("Arial") names.Add("Courier") names.Add("Garamond") names.Add("Time New Roman") names.Add("Verdana") fontNameList.DataSource = names fontNameList.DataBind() ' Add data to the fontSizeList control. Dim fontSizes As New ListItemCollection() fontSizes.Add("Small") fontSizes.Add("Medium") fontSizes.Add("Large") fontSizes.Add("10pt") fontSizes.Add("14pt") fontSizes.Add("20pt") fontSizeList.DataSource = fontSizes fontSizeList.DataBind() ' Set primaryStyle as the style for each control. Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End If End Sub Sub ChangeBorderColor(sender As Object, e As System.EventArgs) primaryStyle.BorderColor = _ Color.FromName(borderColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBackColor(sender As Object, e As System.EventArgs) primaryStyle.BackColor = _ Color.FromName(backColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeForeColor(sender As Object, e As System.EventArgs) primaryStyle.ForeColor = _ Color.FromName(foreColorList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBorderStyle(sender As Object, e As System.EventArgs) primaryStyle.BorderStyle = _ CType([Enum].Parse(GetType(BorderStyle), _ borderStyleList.SelectedItem.Text), BorderStyle) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeBorderWidth(sender As Object, e As System.EventArgs) primaryStyle.BorderWidth = _ Unit.Parse(borderWidthList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeFont(sender As Object, e As System.EventArgs) primaryStyle.Font.Name = _ fontNameList.SelectedItem.Text Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub Sub ChangeFontSize(sender As Object, e As System.EventArgs) primaryStyle.Font.Size = _ FontUnit.Parse(fontSizeList.SelectedItem.Text) Label1.ApplyStyle(primaryStyle) ListBox1.ApplyStyle(primaryStyle) Button1.ApplyStyle(primaryStyle) Table1.ApplyStyle(primaryStyle) TextBox1.ApplyStyle(primaryStyle) End Sub </script> </head> <body> <form id="Form1" runat="server"> <table cellPadding="6" border="0"> <tr> <td> <asp:label id="Label1" Text="Border Properties Example" Runat="server"> <center><br>Label Styles</center> </asp:label> </td> <td> <asp:button id="Button1" runat="server" Text="Button Styles"> </asp:button> </td> <td> <asp:listbox id="ListBox1" Runat="server"> <asp:ListItem Value="0" Text="List Item 0"> </asp:ListItem> <asp:ListItem Value="1" Text="List Item 1"> </asp:ListItem> <asp:ListItem Value="2" Text="List Item 2"> </asp:ListItem> </asp:listbox> </td> <td> <asp:textbox id="TextBox1" Text="TextBox Styles" Runat="server"> </asp:textbox> </td> <td> <asp:table id="Table1" Runat="server"> <asp:TableRow> <asp:TableCell Text="(0,0)"></asp:TableCell> <asp:TableCell Text="(0,1)"></asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell Text="(1,0)"></asp:TableCell> <asp:TableCell Text="(1,1)"></asp:TableCell> </asp:TableRow> </asp:table> </td> </tr> <tr> <td> <asp:Label Runat="server" Text="Border Color:"> </asp:Label> <asp:dropdownlist id="borderColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Style:"> </asp:Label> <asp:dropdownlist id="borderStyleList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderStyle"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Width"> </asp:Label> <asp:dropdownlist id="borderWidthList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderWidth"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Back Color:"> </asp:Label> <asp:dropdownlist id="backColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBackColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Foreground Color:"> </asp:Label> <asp:dropdownlist id="foreColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeForeColor"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Font Name:"> </asp:Label> <asp:dropdownlist id="fontNameList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFont"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Font Size:"> </asp:Label> <asp:dropdownlist id="fontSizeList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFontSize"> </asp:dropdownlist> </td> </tr> </table> </form> </body> </html>
<%@ Page language="C#" AutoEventWireup="true" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Data" %> <html> <head> <script runat="server"> private Style primaryStyle = new Style(); void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { // Add data to the borderColorList, // backColorList, and foreColorList controls. ListItemCollection colors = new ListItemCollection(); colors.Add(Color.Black.Name); colors.Add(Color.Blue.Name); colors.Add(Color.Green.Name); colors.Add(Color.Orange.Name); colors.Add(Color.Purple.Name); colors.Add(Color.Red.Name); colors.Add(Color.White.Name); colors.Add(Color.Yellow.Name); borderColorList.DataSource = colors; borderColorList.DataBind(); backColorList.DataSource = colors; backColorList.DataBind(); foreColorList.DataSource = colors; foreColorList.DataBind(); // Add data to the borderStyleList control. ListItemCollection styles = new ListItemCollection(); Type styleType = typeof(BorderStyle); foreach (string s in Enum.GetNames(styleType)) { styles.Add(s); } borderStyleList.DataSource = styles; borderStyleList.DataBind(); // Add data to the borderWidthList control. ListItemCollection widths = new ListItemCollection(); for (int i = 0; i < 11; i++) { widths.Add(i.ToString() + "px"); } borderWidthList.DataSource = widths; borderWidthList.DataBind(); // Add data to the fontNameList control. ListItemCollection names = new ListItemCollection(); names.Add("Arial"); names.Add("Courier"); names.Add("Garamond"); names.Add("Time New Roman"); names.Add("Verdana"); fontNameList.DataSource = names; fontNameList.DataBind(); // Add data to the fontSizeList control. ListItemCollection fontSizes = new ListItemCollection(); fontSizes.Add("Small"); fontSizes.Add("Medium"); fontSizes.Add("Large"); fontSizes.Add("10pt"); fontSizes.Add("14pt"); fontSizes.Add("20pt"); fontSizeList.DataSource = fontSizes; fontSizeList.DataBind(); //Set primaryStyle as the style for each control. Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } } void ChangeBorderColor(object sender, System.EventArgs e) { primaryStyle.BorderColor = Color.FromName(borderColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBackColor(object sender, System.EventArgs e) { primaryStyle.BackColor = Color.FromName(backColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeForeColor(object sender, System.EventArgs e) { primaryStyle.ForeColor = Color.FromName(foreColorList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBorderStyle(object sender, System.EventArgs e) { primaryStyle.BorderStyle = (BorderStyle)Enum.Parse(typeof(BorderStyle), borderStyleList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeBorderWidth(object sender, System.EventArgs e) { primaryStyle.BorderWidth = Unit.Parse(borderWidthList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeFont(object sender, System.EventArgs e) { primaryStyle.Font.Name = fontNameList.SelectedItem.Text; Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } void ChangeFontSize(object sender, System.EventArgs e) { primaryStyle.Font.Size = FontUnit.Parse(fontSizeList.SelectedItem.Text); Label1.ApplyStyle(primaryStyle); ListBox1.ApplyStyle(primaryStyle); Button1.ApplyStyle(primaryStyle); Table1.ApplyStyle(primaryStyle); TextBox1.ApplyStyle(primaryStyle); } </script> </head> <body> <form id="Form1" runat="server"> <table cellPadding="6" border="0"> <tr> <td> <asp:label id="Label1" Text="Border Properties Example" Runat="server"> <center><br>Label Styles</center> </asp:label> </td> <td> <asp:button id="Button1" runat="server" Text="Button Styles"> </asp:button> </td> <td> <asp:listbox id="ListBox1" Runat="server"> <asp:ListItem Value="0" Text="List Item 0"> </asp:ListItem> <asp:ListItem Value="1" Text="List Item 1"> </asp:ListItem> <asp:ListItem Value="2" Text="List Item 2"> </asp:ListItem> </asp:listbox> </td> <td> <asp:textbox id="TextBox1" Text="TextBox Styles" Runat="server"> </asp:textbox> </td> <td> <asp:table id="Table1" Runat="server"> <asp:TableRow> <asp:TableCell Text="(0,0)"></asp:TableCell> <asp:TableCell Text="(0,1)"></asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell Text="(1,0)"></asp:TableCell> <asp:TableCell Text="(1,1)"></asp:TableCell> </asp:TableRow> </asp:table> </td> </tr> <tr> <td> <asp:Label Runat="server" Text="Border Color:"> </asp:Label> <asp:dropdownlist id="borderColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Style:"> </asp:Label> <asp:dropdownlist id="borderStyleList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderStyle"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Border Width"> </asp:Label> <asp:dropdownlist id="borderWidthList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBorderWidth"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Back Color:"> </asp:Label> <asp:dropdownlist id="backColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeBackColor"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Foreground Color:"> </asp:Label> <asp:dropdownlist id="foreColorList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeForeColor"> </asp:dropdownlist> </td> <td> <asp:Label Runat="server" Text="Font Name:"> </asp:Label> <asp:dropdownlist id="fontNameList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFont"> </asp:dropdownlist> <br> <asp:Label Runat="server" Text="Font Size:"> </asp:Label> <asp:dropdownlist id="fontSizeList" Runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangeFontSize"> </asp:dropdownlist> </td> </tr> </table> </form> </body> </html>
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Style コンストラクタ (StateBag)
アセンブリ: System.Web (system.web.dll 内)
構文
解説
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Style クラス
Style メンバ
System.Web.UI.WebControls 名前空間
System.Web.UI.StateBag
その他の技術情報
ASP.NET Web サーバー コントロールと CSS スタイル
ASP.NET Web サーバー コントロールとブラウザの機能
Style コンストラクタ
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文Dim instance As New Style
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Style コンストラクタ
オーバーロードの一覧| 名前 | 説明 |
|---|---|
| Style () | 既定値を使用して Style クラスの新しいインスタンスを初期化します。 |
| Style (StateBag) | 指定した状態バッグ情報を使用して、Style クラスの新しいインスタンスを初期化します。 |
参照Style フィールド
パブリック フィールド| 名前 | 説明 | |
|---|---|---|
| AlignmentKey | Style の Alignment 設定を取得するためのキーを表します。 |
| BackColorKey | BackColor プロパティに使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| BoldKey | 組み込みスタイル シートから、Font の Bold プロパティを設定するためのスタイルを取得するためのキー。ASP.NET によって内部的に使用されます。 |
| FontNameKey | Font プロパティの Name プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| FontSizeKey | Font プロパティの Size プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| ForeColorKey | ForeColor プロパティに使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| ItalicKey | Font プロパティの Italic プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| WrappingKey | Wrapping に使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
参照Style プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Alignment | スタイルとして適用する配置を取得または設定します。既定値は Alignment.NotSet です。 |
| BackColor | スタイルとして適用する背景色を取得または設定します。既定値は Color.Empty です。 |
| Control | 関連するコントロールへの、厳密に型指定された参照を返します。 |
| DeviceSpecific | コントロールに関連付ける DeviceSpecific の Choice コンストラクトを取得または設定します。該当するコンストラクトが存在しない場合、アクセサは null 参照 (Visual Basic では Nothing) を返します。 |
| Font | コントロールのフォント情報を格納している FontInfo オブジェクトを返します。 |
| ForeColor | スタイルとして適用する前景色を取得または設定します。このプロパティは、通常、テキストの色を設定します。既定値は Empty です。 |
| IsTemplated | Style オブジェクトにアクティブ テンプレート セットがあるかどうかを示す値を取得します。 |
| Item | オーバーロードされます。 継承の使用、不使用にかかわらず、key パラメータを通じてスタイルを返します。 |
| Name | 指定したオブジェクトの名前を取得または設定します。既定値は空の文字列 ("") です。 |
| StyleReference | Style のスタイル プロパティへの参照を取得または設定します。 |
| Wrapping | スタイルとして適用する折り返しモードを取得または設定します。既定値は NotSet です。 |
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| IsTrackingViewState | Style オブジェクトがビューステートへの変更を保存しているかどうかを示す値を取得します。 |
| State | StateBag の現在の内容を取得します。 |
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IStateManager.IsTrackingViewState | このメンバの説明については、IStateManager.IsTrackingViewState のトピックを参照してください。 |
参照Style プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| BackColor | Web サーバー コントロールの背景色を取得または設定します。 |
| BorderColor | Web サーバー コントロールの境界線の色を取得または設定します。 |
| BorderStyle | Web サーバー コントロールの境界線スタイルを取得または設定します。 |
| BorderWidth | Web サーバー コントロールの境界線の幅を取得または設定します。 |
| Container | Component を格納している IContainer を取得します。 ( Component から継承されます。) |
| CssClass | クライアントで Web サーバー コントロールによって表示されるカスケード スタイル シート (CSS: Cascading Style Sheet) クラスを取得または設定します。 |
| Font | Web サーバー コントロールに関連付けられたフォント プロパティを取得します。 |
| ForeColor | Web サーバー コントロールの前景色 (通常はテキストの色) を取得または設定します。 |
| Height | Web サーバー コントロールの高さを取得または設定します。 |
| IsEmpty | 保護されているプロパティ。スタイル要素が状態バッグで定義されているかどうかを示す値を取得します。 |
| RegisteredCssClass | コントロールに登録されているカスケード スタイル シート (CSS) を取得します。 |
| Site | Component の ISite を取得または設定します。 ( Component から継承されます。) |
| Width | Web サーバー コントロールの幅を取得または設定します。 |
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。 ( Component から継承されます。) |
| DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。 ( Component から継承されます。) |
| Events | Component に結び付けられているイベント ハンドラのリストを取得します。 ( Component から継承されます。) |
| IsTrackingViewState | スタイル要素が状態バッグで定義されているかどうかを示す値を返します。 |
| ViewState | スタイル要素を保持している状態バックを取得します。 |
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IStateManager.IsTrackingViewState | このメンバの説明については、IStateManager.IsTrackingViewState のトピックを参照してください。 |
参照関連項目
Style クラスSystem.Web.UI.WebControls 名前空間
BackColor
ForeColor
BorderWidth
BorderStyle
BorderColor
Height
Width
その他の技術情報
ASP.NET のテーマとスキンの概要ASP.NET Web サーバー コントロールと CSS スタイル
ASP.NET Web サーバー コントロールとブラウザの機能
Style メソッド
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| ApplyTo | スタイルのプロパティをコントロールに適用します。 |
| Clone | Style オブジェクトのこのインスタンスのコピーを返します。 |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
| GetTemplate | 指定された名前のテンプレートを返します。 |
| GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
| RegisterStyle | スタイル プロパティを登録して、参照用の一意なキーを返します。 |
| ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| AddParsedSubObject | 指定したオブジェクトに DeviceSpecific プロパティを設定します。 |
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
| LoadViewState | ビューステートを Style オブジェクトの State に読み込みます。 |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
| SaveViewState | ビューステートへの変更を Object に保存します。 |
| TrackViewState | Style オブジェクトのビューステートの追跡を有効にします。 |
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IParserAccessor.AddParsedSubObject | このメンバの説明については、「IParserAccessor.AddParsedSubObject」を参照してください。 |
| System.Web.UI.IStateManager.LoadViewState | このメンバの説明については、「IStateManager.LoadViewState」を参照してください。 |
| System.Web.UI.IStateManager.SaveViewState | このメンバの説明については、「IStateManager.SaveViewState」を参照してください。 |
| System.Web.UI.IStateManager.TrackViewState | このメンバの説明については、「IStateManager.TrackViewState」を参照してください。 |
参照Style メソッド
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| AddAttributesToRender | オーバーロードされます。 指定した System.Web.UI.HtmlTextWriter に表示する必要のある HTML 属性およびスタイルを追加します。このメソッドは、主にコントロールの開発者によって使用されます。 |
| CopyFrom | 指定した Style のスタイル プロパティをこのメソッドの呼び出し元である Style クラスのインスタンスに複製します。 |
| CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 ( MarshalByRefObject から継承されます。) |
| Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 ( Component から継承されます。) |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
| GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
| GetStyleAttributes | 指定された System.Web.UI.IUrlResolutionService 実装オブジェクトの System.Web.UI.CssStyleCollection オブジェクトを取得します。 |
| GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
| InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
| MergeWith | 指定した Style のスタイル プロパティをこのメソッドの呼び出し元である Style クラスのインスタンスに結合します。 |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
| Reset | 定義されたスタイル要素を状態バッグから削除します。 |
| SetDirty | Style にマークを付けて、その状態がビューステートに記録されるようにします。 |
| ToString | Component の名前を格納している String を返します (存在する場合)。このメソッドはオーバーライドできません。 ( Component から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 ( Component から継承されます。) |
| FillStyleAttributes | 指定されたオブジェクトのスタイル プロパティを System.Web.UI.CssStyleCollection オブジェクトに追加します。 |
| Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 ( Component から継承されます。) |
| GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 ( Component から継承されます。) |
| LoadViewState | 以前に保存した状態を読み込みます。 |
| MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
| SaveViewState | 保護されているメソッド。TrackViewState メソッドの呼び出し後に変更された状態をすべて保存します。 |
| SetBit | 保護されている内部メソッド。状態バッグに格納されているスタイル プロパティを示す内部ビットマスク フィールドを設定します。 |
| TrackViewState | 保護されているメソッド。状態変化の追跡の開始位置をコントロールにマークします。"マーク" の後で加えられた変更はすべて追跡され、コントロールのビューステートの一部として保存されます。 |
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IStateManager.LoadViewState | 以前に保存した状態を読み込みます。 |
| System.Web.UI.IStateManager.SaveViewState | 状態の変化を示すオブジェクトを返します。 |
| System.Web.UI.IStateManager.TrackViewState | 状態変化の追跡を開始します。 |
参照関連項目
Style クラスSystem.Web.UI.WebControls 名前空間
BackColor
ForeColor
BorderWidth
BorderStyle
BorderColor
Height
Width
その他の技術情報
ASP.NET のテーマとスキンの概要ASP.NET Web サーバー コントロールと CSS スタイル
ASP.NET Web サーバー コントロールとブラウザの機能
Style メンバ
ASP.NET モバイル コントロールのスタイル特性を 1 つのオブジェクトに整理します。
Style データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ
パブリック フィールド| 名前 | 説明 | |
|---|---|---|
| AlignmentKey | Style の Alignment 設定を取得するためのキーを表します。 |
| BackColorKey | BackColor プロパティに使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| BoldKey | 組み込みスタイル シートから、Font の Bold プロパティを設定するためのスタイルを取得するためのキー。ASP.NET によって内部的に使用されます。 |
| FontNameKey | Font プロパティの Name プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| FontSizeKey | Font プロパティの Size プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| ForeColorKey | ForeColor プロパティに使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| ItalicKey | Font プロパティの Italic プロパティに使用するスタイルを、組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
| WrappingKey | Wrapping に使用するスタイルを組み込みスタイル シートから取得するためのキー。ASP.NET によって内部的に使用されます。 |
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Alignment | スタイルとして適用する配置を取得または設定します。既定値は Alignment.NotSet です。 |
| BackColor | スタイルとして適用する背景色を取得または設定します。既定値は Color.Empty です。 |
| Control | 関連するコントロールへの、厳密に型指定された参照を返します。 |
| DeviceSpecific | コントロールに関連付ける DeviceSpecific の Choice コンストラクトを取得または設定します。該当するコンストラクトが存在しない場合、アクセサは null 参照 (Visual Basic では Nothing) を返します。 |
| Font | コントロールのフォント情報を格納している FontInfo オブジェクトを返します。 |
| ForeColor | スタイルとして適用する前景色を取得または設定します。このプロパティは、通常、テキストの色を設定します。既定値は Empty です。 |
| IsTemplated | Style オブジェクトにアクティブ テンプレート セットがあるかどうかを示す値を取得します。 |
| Item | オーバーロードされます。 継承の使用、不使用にかかわらず、key パラメータを通じてスタイルを返します。 |
| Name | 指定したオブジェクトの名前を取得または設定します。既定値は空の文字列 ("") です。 |
| StyleReference | Style のスタイル プロパティへの参照を取得または設定します。 |
| Wrapping | スタイルとして適用する折り返しモードを取得または設定します。既定値は NotSet です。 |
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| IsTrackingViewState | Style オブジェクトがビューステートへの変更を保存しているかどうかを示す値を取得します。 |
| State | StateBag の現在の内容を取得します。 |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| ApplyTo | スタイルのプロパティをコントロールに適用します。 |
| Clone | Style オブジェクトのこのインスタンスのコピーを返します。 |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
| GetTemplate | 指定された名前のテンプレートを返します。 |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| RegisterStyle | スタイル プロパティを登録して、参照用の一意なキーを返します。 |
| ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| AddParsedSubObject | 指定したオブジェクトに DeviceSpecific プロパティを設定します。 |
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
| LoadViewState | ビューステートを Style オブジェクトの State に読み込みます。 |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
| SaveViewState | ビューステートへの変更を Object に保存します。 |
| TrackViewState | Style オブジェクトのビューステートの追跡を有効にします。 |
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IParserAccessor.AddParsedSubObject | このメンバの説明については、「IParserAccessor.AddParsedSubObject」を参照してください。 |
| System.Web.UI.IStateManager.LoadViewState | このメンバの説明については、「IStateManager.LoadViewState」を参照してください。 |
| System.Web.UI.IStateManager.SaveViewState | このメンバの説明については、「IStateManager.SaveViewState」を参照してください。 |
| System.Web.UI.IStateManager.TrackViewState | このメンバの説明については、「IStateManager.TrackViewState」を参照してください。 |
| System.Web.UI.IStateManager.IsTrackingViewState | このメンバの説明については、IStateManager.IsTrackingViewState のトピックを参照してください。 |
参照Style メンバ
Web サーバー コントロールのスタイルを表します。
Style データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| BackColor | Web サーバー コントロールの背景色を取得または設定します。 |
| BorderColor | Web サーバー コントロールの境界線の色を取得または設定します。 |
| BorderStyle | Web サーバー コントロールの境界線スタイルを取得または設定します。 |
| BorderWidth | Web サーバー コントロールの境界線の幅を取得または設定します。 |
| Container | Component を格納している IContainer を取得します。(Component から継承されます。) |
| CssClass | クライアントで Web サーバー コントロールによって表示されるカスケード スタイル シート (CSS: Cascading Style Sheet) クラスを取得または設定します。 |
| Font | Web サーバー コントロールに関連付けられたフォント プロパティを取得します。 |
| ForeColor | Web サーバー コントロールの前景色 (通常はテキストの色) を取得または設定します。 |
| Height | Web サーバー コントロールの高さを取得または設定します。 |
| IsEmpty | 保護されているプロパティ。スタイル要素が状態バッグで定義されているかどうかを示す値を取得します。 |
| RegisteredCssClass | コントロールに登録されているカスケード スタイル シート (CSS) を取得します。 |
| Site | Component の ISite を取得または設定します。(Component から継承されます。) |
| Width | Web サーバー コントロールの幅を取得または設定します。 |
プロテクト プロパティ| 名前 | 説明 | |
|---|---|---|
| CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。(Component から継承されます。) |
| DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。(Component から継承されます。) |
| Events | Component に結び付けられているイベント ハンドラのリストを取得します。(Component から継承されます。) |
| IsTrackingViewState | スタイル要素が状態バッグで定義されているかどうかを示す値を返します。 |
| ViewState | スタイル要素を保持している状態バックを取得します。 |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| AddAttributesToRender | オーバーロードされます。 指定した System.Web.UI.HtmlTextWriter に表示する必要のある HTML 属性およびスタイルを追加します。このメソッドは、主にコントロールの開発者によって使用されます。 |
| CopyFrom | 指定した Style のスタイル プロパティをこのメソッドの呼び出し元である Style クラスのインスタンスに複製します。 |
| CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 (MarshalByRefObject から継承されます。) |
| Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 (Component から継承されます。) |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
| GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
| GetStyleAttributes | 指定された System.Web.UI.IUrlResolutionService 実装オブジェクトの System.Web.UI.CssStyleCollection オブジェクトを取得します。 |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 (MarshalByRefObject から継承されます。) |
| MergeWith | 指定した Style のスタイル プロパティをこのメソッドの呼び出し元である Style クラスのインスタンスに結合します。 |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| Reset | 定義されたスタイル要素を状態バッグから削除します。 |
| SetDirty | Style にマークを付けて、その状態がビューステートに記録されるようにします。 |
| ToString | Component の名前を格納している String を返します (存在する場合)。このメソッドはオーバーライドできません。 (Component から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 (Component から継承されます。) |
| FillStyleAttributes | 指定されたオブジェクトのスタイル プロパティを System.Web.UI.CssStyleCollection オブジェクトに追加します。 |
| Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 (Component から継承されます。) |
| GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 (Component から継承されます。) |
| LoadViewState | 以前に保存した状態を読み込みます。 |
| MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
| SaveViewState | 保護されているメソッド。TrackViewState メソッドの呼び出し後に変更された状態をすべて保存します。 |
| SetBit | 保護されている内部メソッド。状態バッグに格納されているスタイル プロパティを示す内部ビットマスク フィールドを設定します。 |
| TrackViewState | 保護されているメソッド。状態変化の追跡の開始位置をコントロールにマークします。"マーク" の後で加えられた変更はすべて追跡され、コントロールのビューステートの一部として保存されます。 |
パブリック イベント
明示的インターフェイスの実装| 名前 | 説明 | |
|---|---|---|
| System.Web.UI.IStateManager.LoadViewState | 以前に保存した状態を読み込みます。 |
| System.Web.UI.IStateManager.SaveViewState | 状態の変化を示すオブジェクトを返します。 |
| System.Web.UI.IStateManager.TrackViewState | 状態変化の追跡を開始します。 |
| System.Web.UI.IStateManager.IsTrackingViewState | このメンバの説明については、IStateManager.IsTrackingViewState のトピックを参照してください。 |
参照関連項目
Style クラスSystem.Web.UI.WebControls 名前空間
BackColor
ForeColor
BorderWidth
BorderStyle
BorderColor
Height
Width
その他の技術情報
ASP.NET のテーマとスキンの概要ASP.NET Web サーバー コントロールと CSS スタイル
ASP.NET Web サーバー コントロールとブラウザの機能
生物学用語辞典 |
花柱
ウィキペディア |
Style.
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2011/09/19 06:08 UTC 版)
| Style. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 西野カナ の シングル | ||||||||||
| 収録アルバム | LOVE one. | |||||||||
| B面 | Stamp September 1st |
|||||||||
| リリース | 2008年8月13日 | |||||||||
| ジャンル | J-POP | |||||||||
| レーベル | SME Records | |||||||||
| 作詞・作曲 | Kana Nishino(作詞) Kazuhiko.M(作曲) |
|||||||||
| チャート最高順位 | ||||||||||
|
||||||||||
| 西野カナ シングル 年表 | ||||||||||
|
||||||||||
|
||||||||||
「Style.」(スタイル)は、西野カナの3枚目のシングル。
解説
- 表題曲はアニメ『ソウルイーター』の第2期エンディングテーマ曲。西野にとって初のアニメタイアップであり、初めてオリコンチャート100位圏内に入ったシングルでもある。
- PVにはモデルの田母神智子、武居梨恵、増山藍が出演している。なお、田母神は西野の5作目のシングル『遠くても feat.WISE』に収録されている『GIRLS JUST WANT TO HAVE FUN』(シンディ・ローパーのカヴァー)にコーラスとしても参加している。
収録曲
- Style.
(作詞:Kana Nishino / 作曲・編曲:Kazuhiko.M) - Stamp
(作詞:Kana Nishino / 作曲:Marimo Wamoto / 編曲:Tomoshige Gonda) - September 1st
(作詞:Kana Nishino / 作曲・編曲:Nao Tanaka)
|
||||||||||||||||||||||||||
スタイル
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2011/10/29 20:44 UTC 版)
(style から転送)
スタイル (英語:Style)は、日本語では文体、様式、型、種類、流行、品位、芸風などの意味を持つ。
-
- (服装の型式。転じて日本語では)体つきや姿。容姿。→容貌を参照。
- スタイル (ビール) - ビールにおける分類のひとつ。
- ブレイクダンスの動きの一つ。
- スタイルシートの略。
- タイトルとしての使用例
- 音楽作品
-
- LUNA SEAのアルバム。STYLE (LUNA SEAのアルバム)を参照。
- EXILEのシングル。Style (EXILEの曲)を参照。
- 安室奈美恵の6thアルバムSTYLE (安室奈美恵のアルバム)を参照。
- 平井堅の19thシングル。Style (平井堅の曲)を参照。
- GRASS VALLEYのアルバム。STYLE (GRASS VALLEYのアルバム)を参照。
- 大韓民国のダンス音楽グループS♯arpの第5アルバム。2002年9月発売。
-
- 雑誌
-
- 講談社のキャリア・ファッション雑誌『 style 』
-
- 映像作品
-
- 韓国のテレビドラマ。スタイル (テレビドラマ)を参照。
-
- スタイル!
-
- 2000年にテレビ朝日で放送されたテレビドラマ→「スタイル!」
- 2004年に東京ディズニーシーで開催されたエンターテイメントショー → ドラマティック・ディズニーシー#スタイル!
| このページは曖昧さ回避のためのページです。一つの言葉や名前が二つ以上の意味や物に用いられている場合の水先案内のために、異なる用法を一覧にしてあります。お探しの用語に一番近い記事を選んで下さい。このページへリンクしているページを見つけたら、リンクを適切な項目に張り替えて下さい。 |
固有名詞の分類
styleに関連した本
- アプリSTYLE vol.6 (Koiunreki2012年1月号増刊) イースト・プレス
- アプリSTYLE Vol.5 (koiunreki2011年11月号増刊) イースト・プレス
- 東原亜希のStyle Book (美人開花シリーズ) 東原 亜希 ワニブックス
styleに関係した商品
- 到着後レビュー記入で送料無料! B.V.D. BASIC STYLE ボクサーパンツ「期間限定さらに値下げ+お買得な2枚組+吸水速乾」B.V.D. BASIC STYLE 前開ボクサーブリーフ(ボクサーパンツ)【BVD】BVD
- サンダル トングサンダル レディース 海外セレブ愛用 ぺたんこ ストラップ モロッコサンダル レディース 5250円以上で 送料無料 トングサンダル ビジュー ぺたんこ ペタンコ ストラップ トング モロッコ 全3色 %OFF SALE 激安 【gal-ladies】【ntrl-ladies】【sty-csl-ladies】【swt-fmn-ladies】【car-elg-ladies】 style-selectshop 】一部予約(1/中頃)AquaGarage
- ウエッジソールサンダル エスパドリーユ レディース ミュール ねじりひも ナチュラルかわいい♪サンダル レディース ウエッジソール 5250円以上で 送料無料 ウェッジソール ウェッジ ミュール ミュールサンダル エスパドリーユ ねじりひも 全6色 %OFF SALE 激安 【gal-ladies】【ntrl-ladies】【swt-fmn-ladies】【car-elg-ladies】【sty-csl-ladies】 style-selectshopAquaGarage
.gif)