Calendar.OtherMonthDayStyle プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Calendar.OtherMonthDayStyle プロパティの意味・解説 

Calendar.OtherMonthDayStyle プロパティ

Calendar コントロール日付のうち、表示された月にない日付スタイル プロパティ取得します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public ReadOnly Property
 OtherMonthDayStyle As TableItemStyle
Dim instance As Calendar
Dim value As TableItemStyle

value = instance.OtherMonthDayStyle
public TableItemStyle OtherMonthDayStyle { get;
 }
public:
property TableItemStyle^ OtherMonthDayStyle {
    TableItemStyle^ get ();
}
/** @property */
public TableItemStyle get_OtherMonthDayStyle ()
public function get OtherMonthDayStyle
 () : TableItemStyle

プロパティ
Calendar コントロール日付のうち、表示された月にない日付スタイル プロパティ格納している TableItemStyle。既定値は空の TableItemStyle です。

解説解説
使用例使用例

OtherMonthDayStyle プロパティ使用してCalendar コントロール日付の中で現在表示されている月にない日付明る灰色前景色を指定する方法次のコード例示します

<%@ Page Language="VB" AutoEventWireup="True"
 %>
<%@ Import Namespace="System.Drawing"
 %>

<html>
<head>

   <script runat="server">

      Sub Index_Changed(sender As Object,
 e As EventArgs)

         ' Set the foreground color of days not in the current
         ' month to the color selected from the DropDownList control.
         Calendar1.OtherMonthDayStyle.ForeColor = _
            Color.FromName(ColorList.SelectedItem.Value)

      End Sub

   </script>

</head>
<body>

   <form runat="server">

      <h3>Calendar OtherMonthDayStyle Example</h3>

      <asp:Calendar id="Calendar1" runat="server">

         <OtherMonthDayStyle ForeColor="LightGray">
         </OtherMonthDayStyle>

      </asp:Calendar>

      <br><br>

      Select a color for the days not
 in the current month:

      <br>     
 
      <asp:DropDownList id="ColorList"
           AutoPostBack="True"
           OnSelectedIndexChanged="Index_Changed"
           runat="server">

         <asp:ListItem Value="DarkGray">Dark
 Gray</asp:ListItem>
         <asp:ListItem Value="LightGray" Selected="True">Light
 Gray</asp:ListItem>
         <asp:ListItem Value="DarkKhaki">Dark
 Khaki</asp:ListItem>
         <asp:ListItem Value="Khaki">Khaki</asp:ListItem>
         <asp:ListItem Value="White">White</asp:ListItem>

      </asp:DropDownList>      
            
   </form>
        
</body>
</html>

<%@ Page Language="C#" AutoEventWireup="True" %>
<%@ Import Namespace="System.Drawing" %>

<html>
<head>

   <script runat="server">

      void Index_Changed(Object sender, EventArgs e)
      {

         // Set the foreground color of days not in the current
         // month to the color selected from the DropDownList control.
         Calendar1.OtherMonthDayStyle.ForeColor = 
            Color.FromName(ColorList.SelectedItem.Value);

      }

   </script>

</head>
<body>

   <form runat="server">

      <h3>Calendar OtherMonthDayStyle Example</h3>

      <asp:Calendar id="Calendar1" runat="server">

         <OtherMonthDayStyle ForeColor="LightGray">
         </OtherMonthDayStyle>

      </asp:Calendar>

      <br><br>

      Select a color for the days not in the
 current month:

      <br>     
 
      <asp:DropDownList id="ColorList"
           AutoPostBack="True"
           OnSelectedIndexChanged="Index_Changed"
           runat="server">

         <asp:ListItem Value="DarkGray">Dark Gray</asp:ListItem>
         <asp:ListItem Value="LightGray" Selected="True">Light
 Gray</asp:ListItem>
         <asp:ListItem Value="DarkKhaki">Dark Khaki</asp:ListItem>
         <asp:ListItem Value="Khaki">Khaki</asp:ListItem>
         <asp:ListItem Value="White">White</asp:ListItem>

      </asp:DropDownList>      
            
   </form>
        
</body>
</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Calendar.OtherMonthDayStyle プロパティ」の関連用語

Calendar.OtherMonthDayStyle プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Calendar.OtherMonthDayStyle プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS