FrameworkElement.ForceCursor 속성

정의

UI(사용자 인터페이스)가 속성에 의해 Cursor 선언된 대로 커서를 렌더링하도록 해야 하는지 여부를 FrameworkElement 나타내는 값을 가져오거나 설정합니다.

public:
 property bool ForceCursor { bool get(); void set(bool value); };
public bool ForceCursor { get; set; }
member this.ForceCursor : bool with get, set
Public Property ForceCursor As Boolean

속성 값

Boolean

이 요소 위에 있을 때 커서에 대한 현재 Cursor 설정(모든 자식 요소 포함)을 사용하여 커서가 표시되도록 하려면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

예제

다음 예제에서는 커서 값을 강제로 지정합니다.

<StackPanel
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
  <StackPanel Name="CursorForced" ForceCursor="true" Cursor="Hand">
    <Label>Cursors Forced</Label>
    <TextBox>Fill me in!</TextBox>
  </StackPanel>
  <StackPanel Name="CursorNotForced">
    <Label>Cursors Not Forced</Label>
    <TextBox>Fill me in!</TextBox>
  </StackPanel>
</StackPanel>

설명

이 속성을 true 설정하면 자식 요소에 의해 설정된 커서 기본 설정을 재정의합니다. 일반적으로 애플리케이션 UI에서 이렇게 하면 특히 자식 요소가 커서를 지정하려고 하는 경우 사용자에게 혼동이 될 수 있습니다. 설정 ForceCursor 은 제어 서브클래싱 또는 작성 시나리오에서 더 적합합니다.

종속성 속성 정보

식별자 필드 ForceCursorProperty
메타 데이터 속성 설정 true 없음

적용 대상

추가 정보