エクスポート (0) 印刷
すべて展開
情報
要求されたトピックは次のとおりです。しかし、このトピックはこのライブラリには含まれていません。

UISettings Class

アプリケーションのユーザー インターフェイスの共通の設定および操作のセットを含んでいます。

構文


var uiSettings = new Windows.UI.ViewManagement.UISettings();

属性

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

メンバー

UISettingsクラス には次の種類のメンバーがあります。

コンストラクター

UISettingsクラス にはこれらのコンストラクターがあります。

コンストラクター説明
UISettings Creates a new default instance of the UISettings class.

 

メソッド

The UISettings クラス には次のメソッドがあります。 With C#、Visual Basic、および C++ では、以下からもメソッドが継承されます。Object クラス.

メソッド説明
UIElementColor Gets the color used for a specific user interface element type, such as a button face or window text.

 

プロパティ

UISettingsクラス には次のプロパティがあります。

プロパティアクセスの種類説明

AnimationsEnabled

読み取り専用Gets whether animations are enabled for the user interface.

CaretBlinkRate

読み取り専用Gets the blink rate of a new caret created by the app view.

CaretBrowsingEnabled

読み取り専用Gets whether the caret can be used for browse operations.

CaretWidth

読み取り専用Gets the width of a new caret created by the app view.

CursorSize

読み取り専用Gets the size of a new cursor created by the app view.

DoubleClickTime

読み取り専用Gets the maximum allowed time between clicks in a double-click operation.

HandPreference

読み取り専用Gets the directional preference of the user interface created by the app view.

MessageDuration

読み取り専用Gets the length of time a message is displayed for the app view.

MouseHoverTime

読み取り専用Gets the amount of time the mouse pointer can rest in a hover rectangle before a hover event is raised.

ScrollBarArrowSize

読み取り専用Gets the size of a scroll bar arrow for windows associated with the app view.

ScrollBarSize

読み取り専用Gets the size of a scroll bar for windows associated with the app view.

ScrollBarThumbBoxSize

読み取り専用Gets the size of a thumb box for windows associated with the app view.

 

解説


void SDKSample::HighContrast::UI::UIGetSettings_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{ 
  Button^ b = safe_cast<Button^>(sender);
  if (b != nullptr)
  {
		  UISettings^ pUserSettings = ref new UISettings();
		  Platform::String^ Buffer;
    Windows::UI::Color Color;
        
        Buffer =  "Hand Preference " + (pUserSettings->HandPreference == HandPreference::RightHanded ? "right" : "left") + "\n";
        Buffer += "Cursor Size "  + pUserSettings->CursorSize.Width.ToString() + " x " + pUserSettings->CursorSize.Height.ToString() + "\n";
        Buffer += "Scrollbar Size "  + pUserSettings->ScrollBarSize.Width.ToString() + " x " + pUserSettings->ScrollBarSize.Height.ToString() + "\n";
        Buffer += "Scrollbar Arrow Size "   + pUserSettings->ScrollBarArrowSize.Width.ToString() + " x " + pUserSettings->ScrollBarArrowSize.Height.ToString() + "\n";
        Buffer += "Scrollbar Thumb Box Size " + pUserSettings->ScrollBarThumbBoxSize.Width.ToString() + " x " + pUserSettings->ScrollBarThumbBoxSize.Height.ToString() + "\n";
        Buffer += "Message Duration "  + pUserSettings->MessageDuration.ToString() + "\n";
        Buffer += "Animations Enabled "  + (pUserSettings->AnimationsEnabled ? "true" : "false") + "\n"; 
        Buffer += "Caret Browsing Enabled "  + (pUserSettings->CaretBrowsingEnabled ? "true" : "false") + "\n";
        Buffer += "Caret Blink Rate "  + pUserSettings->CaretBlinkRate.ToString() + "\n";
        Buffer += "Caret Width " + pUserSettings->CaretWidth.ToString() + "\n";
        Buffer += "Double Click Time " + pUserSettings->DoubleClickTime.ToString() + "\n";
        Buffer += "Mouse Hover Time " + pUserSettings->MouseHoverTime.ToString() + "\n";

        Buffer += "System Colors: \n";

        Color = pUserSettings->UIElementColor(UIElementType::ActiveCaption);
        Buffer += "Active Caption: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::Background);
        Buffer += "Background: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::ButtonFace);
        Buffer += "Button Face: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::ButtonText);
        Buffer += "Button Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::CaptionText);
        Buffer += "Caption Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::GrayText);
        Buffer += "Gray Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::Highlight);
        Buffer += "Highlight: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::HighlightText);
        Buffer += "Highlight Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::Hotlight);
        Buffer += "Hotlight: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::InactiveCaption);
        Buffer += "Inactive Caption: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::InactiveCaptionText);
        Buffer += "Inactive Caption Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::Window);
        Buffer += "Window: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";
        Color = pUserSettings->UIElementColor(UIElementType::WindowText);
        Buffer += "Window Text: " + Color.R.ToString() + ", " + Color.G.ToString() + ", " + Color.B.ToString() + "\n";

		  UIOutputTextBlock->Text = Buffer;
  }
}

要件

最小限サポートされるクライアント

Windows 8 [Windows ストア アプリのみ]

最小限サポートされるサーバー

Windows Server 2012 [Windows ストア アプリのみ]

最小限サポートされる携帯電話

Windows Phone 8

名前空間

Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]

メタデータ

Windows.winmd

参照

UI のコントラストと設定のサンプル

 

 

表示:
© 2015 Microsoft