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

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

IUIService.Styles プロパティ

ホスト環境固有スタイルコレクション取得します

名前空間: System.Windows.Forms.Design
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As IUIService
Dim value As IDictionary

value = instance.Styles
IDictionary Styles { get; }
property IDictionary^ Styles {
    IDictionary^ get ();
}
/** @property */
IDictionary get_Styles ()
function get Styles () : IDictionary

プロパティ
スタイル設定値格納している IDictionary。

解説解説

ディクショナリは、ホスト環境からの情報を提供できます少なくとも、ディクショナリは、標準UI テキスト使用するフォント、および強調表示使用する色で構成されています。これらの必須スタイルは "DialogFont" および "HighlightColor" です。

これらのスタイルの値は、スタイルをディクショナリのキーとして使用しキーインデクサとして使用してディクショナリにアクセスして取得できます。例 : (IUIService を実装しているオブジェクト).Styles[(引用符囲まれスタイル名文字列)]

使用例使用例

ホスト環境からダイアログ ボックス フォント取得するコード例次に示します

' The specified IDesigner implements IUIService.
Function GetFont(designer As IDesigner) As
 Font
    Dim hostfont As Font
       
    ' Gets the dialog box font from the host environment.
    hostfont = CType(CType(designer, IUIService).Styles("DialogFont"),
 Font)
       
    Return hostfont
End Function

// The specified IDesigner implements IUIService.
Font GetFont(IDesigner designer)
{      
      Font        hostfont;

      // Gets the dialog box font from the host environment. 
      hostfont = (Font)((IUIService)designer).Styles["DialogFont"];
      
      return hostfont;
}
   
// The specified IDesigner implements IUIService.
System::Drawing::Font^ GetFont( IDesigner^ designer )
{
   System::Drawing::Font^ hostfont;
   
   // Gets the dialog box font from the host environment.
   hostfont = dynamic_cast<System::Drawing::Font^>(dynamic_cast<IUIService^>(designer)->Styles[
 "DialogFont" ]);
   return hostfont;
}
// The specified IDesigner implements IUIService.
Font GetFont(IDesigner designer)
{
    Font hostfont;
    // Gets the dialog box font from the host environment. 
    hostfont = ((Font)(((IUIService)(designer)).get_Styles().
        get_Item("DialogFont")));
    return hostfont;
} //GetFont
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IUIService インターフェイス
IUIService メンバ
System.Windows.Forms.Design 名前空間
Font


このページでは「.NET Framework クラス ライブラリ リファレンス」からIUIService.Styles プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIUIService.Styles プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIUIService.Styles プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS