UISettings Class

일반적인 앱 사용자 인터페이스 설정 및 작업의 집합을 포함합니다.

구문


public ref class UISettings sealed 

특성

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

멤버

UISettings클래스에는 다음과 같은 형식의 멤버가 있습니다.

생성자

UISettings클래스에는 다음과 같은 생성자가 있습니다.

생성자Description
UISettings Creates a new default instance of the UISettings class.

 

메서드

The UISettings 클래스 - 이러한 메서드가 있습니다. C#, Visual Basic 및 C++에서는 다음 위치의 메서드도 상속합니다. Object 클래스.

메서드Description
UIElementColor Gets the color used for a specific user interface element type, such as a button face or window text.

 

속성

UISettings클래스 - 이러한 속성이 있습니다.

속성사용 권한Description

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

Namespace

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

Metadata

Windows.winmd

참고 항목

UI 대비 및 설정 샘플

 

 

표시:
© 2014 Microsoft