RichEditBox.TextChanging 이벤트

정의

편집 상자의 텍스트가 변경되기 시작하지만 렌더링되기 전에 동기적으로 발생합니다.

// Register
event_token TextChanging(TypedEventHandler<RichEditBox, RichEditBoxTextChangingEventArgs const&> const& handler) const;

// Revoke with event_token
void TextChanging(event_token const* cookie) const;

// Revoke with event_revoker
RichEditBox::TextChanging_revoker TextChanging(auto_revoke_t, TypedEventHandler<RichEditBox, RichEditBoxTextChangingEventArgs const&> const& handler) const;
public event TypedEventHandler<RichEditBox,RichEditBoxTextChangingEventArgs> TextChanging;
function onTextChanging(eventArgs) { /* Your code */ }
richEditBox.addEventListener("textchanging", onTextChanging);
richEditBox.removeEventListener("textchanging", onTextChanging);
- or -
richEditBox.ontextchanging = onTextChanging;
Public Custom Event TextChanging As TypedEventHandler(Of RichEditBox, RichEditBoxTextChangingEventArgs) 
<RichEditBox TextChanging="eventhandler"/>

이벤트 유형

설명

이벤트 데이터는 RichEditBoxTextChangingEventArgs를 참조하세요.

TextChanging 이벤트는 새 텍스트가 렌더링되기 전에 동기적으로 발생합니다. 반면 TextChanged 이벤트는 비동기적이며 새 텍스트가 렌더링된 후에 발생합니다.

TextChanging 이벤트가 발생하면 Document 속성은 이미 새 값을 반영하지만 UI에서 렌더링되지 않습니다. 일반적으로 텍스트가 렌더링되기 전에 텍스트 값 및 선택을 업데이트하기 위해 이 이벤트를 처리합니다. 이렇게 하면 텍스트가 빠르게 렌더링, 업데이트 및 다시 렌더링될 때 발생할 수 있는 텍스트 깜박임이 방지됩니다.

참고

레이아웃 중과 같이 XAML 시각적 트리에 대한 변경이 허용되지 않는 경우에 발생할 수 있는 동기 이벤트입니다. 따라서 TextChanging 이벤트 처리기 내의 코드는 주로 Document 속성을 검사하고 업데이트하도록 제한해야 합니다. 팝업 표시 또는 시각적 트리에서 요소 추가/제거와 같은 다른 작업을 수행하려고 하면 잠재적으로 심각한 오류가 발생하여 충돌이 발생할 수 있습니다. TextChanged 이벤트 처리기에서 이러한 다른 변경 내용을 수행하거나 별도의 비동기 작업으로 실행하는 것이 좋습니다.

적용 대상

추가 정보