TextChangedEventArgs 클래스

정의

TextChanged 이벤트에 대한 데이터를 제공합니다.

public ref class TextChangedEventArgs : System::Windows::RoutedEventArgs
public class TextChangedEventArgs : System.Windows.RoutedEventArgs
type TextChangedEventArgs = class
    inherit RoutedEventArgs
Public Class TextChangedEventArgs
Inherits RoutedEventArgs
상속
TextChangedEventArgs

예제

다음 예제에서는 표시 횟수의 텍스트는 TextBox 변경 합니다. 이 예제에 대 한 XAML 코드는 다음과 같습니다.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
  x:Class="SDKSample.DetectChangedTextExample"
  Title="DetectChangedText">
  <StackPanel>
    <TextBox
      Name="tbCountingChanges"    
      TextChanged="textChangedEventHandler"
      TextWrapping="Wrap">
      Here is the initial text in the textbox.  Each time the contents of this box is changed, a change counter will
      be incremented and displayed in the TextBox below.  Note that the TextChanged event is called when the TextBox
      control is initially populated with text, so the changes counter starts of at 1.
    </TextBox>
    <TextBox Name="tbCounterText">0</TextBox>
    
  </StackPanel>  
</Page>

예제에 대한 코드 숨김은 다음과 같습니다.

using System.Windows.Controls;

namespace SDKSample
{
    public partial class DetectChangedTextExample : Page
    {
        // This is a counter for the number of times the TextChanged fires
        // for the tbCountingChanges TextBox.
        private int uiChanges = 0;

        // Event handler for TextChanged Event.
        private void textChangedEventHandler(object sender, TextChangedEventArgs args)
        {

            uiChanges++;
            if (tbCounterText != null)
            {
                tbCounterText.Text = uiChanges.ToString();
            }
        }
    }
}

Namespace SDKSample

    Partial Public Class DetectChangedTextExample
        Inherits Page

        ' This is a counter for the number of times the TextChanged fires
        ' for the tbCountingChanges TextBox.
        Private uiChanges As Integer = 0

        ' Event handler for TextChanged Event.
        Private Sub textChangedEventHandler(ByVal sender As Object,
                                            ByVal args As TextChangedEventArgs)

            uiChanges += 1
            If tbCounterText IsNot Nothing Then
                tbCounterText.Text = uiChanges.ToString()
            End If

        End Sub
    End Class
End Namespace

생성자

TextChangedEventArgs(RoutedEvent, UndoAction)

지정된 이벤트 ID 및 실행 취소 작업을 사용하여 TextChangedEventArgs 클래스의 새 인스턴스를 초기화합니다.

TextChangedEventArgs(RoutedEvent, UndoAction, ICollection<TextChange>)

지정된 이벤트 ID, 실행 취소 작업 및 텍스트 변경 내용을 사용하여 TextChangedEventArgs 클래스의 새 인스턴스를 초기화합니다.

속성

Changes

발생한 변경 내용에 대한 정보가 들어 있는 개체의 컬렉션을 가져옵니다.

Handled

경로를 따라 이동할 때 라우트된 이벤트의 현재 이벤트 처리 상태를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 RoutedEventArgs)
OriginalSource

부모 클래스에 의한 Source 조정 앞에 순수 적중 횟수 테스트에서 결정한 원본 보고 소스를 가져옵니다.

(다음에서 상속됨 RoutedEventArgs)
RoutedEvent

RoutedEventArgs 인스턴스와 연결된 RoutedEvent를 가져오거나 설정합니다.

(다음에서 상속됨 RoutedEventArgs)
Source

이벤트를 발생시킨 개체에 대한 참조를 가져오거나 설정합니다.

(다음에서 상속됨 RoutedEventArgs)
UndoAction

실행 취소 스택이 이 텍스트를 변경하거나 텍스트 변경의 영향을 받는 방식을 가져옵니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
InvokeEventHandler(Delegate, Object)

적절한 형식 캐스팅을 수행하여 TextChangedEventHandler 이벤트에 대한 형식이 안전한 TextChanged 대리자를 호출합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnSetSource(Object)

파생된 클래스에서 재정의되는 경우 인스턴스의 Source 속성 값이 변경될 때마다 알림 콜백 진입점을 제공합니다.

(다음에서 상속됨 RoutedEventArgs)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상