TextChangedEventArgs 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이벤트에 대한 TextChanged 데이터를 제공합니다.
public ref class TextChangedEventArgs : System::Windows::RoutedEventArgs
public class TextChangedEventArgs : System.Windows.RoutedEventArgs
type TextChangedEventArgs = class
inherit RoutedEventArgs
Public Class TextChangedEventArgs
Inherits RoutedEventArgs
- 상속
예제
다음 예제에서는 텍스트 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
생성자
| Name | Description |
|---|---|
| TextChangedEventArgs(RoutedEvent, UndoAction, ICollection<TextChange>) |
지정된 이벤트 ID, 실행 취소 작업 및 텍스트 변경 내용을 사용하여 클래스의 TextChangedEventArgs 새 인스턴스를 초기화합니다. |
| TextChangedEventArgs(RoutedEvent, UndoAction) |
지정된 이벤트 ID 및 실행 취소 작업을 사용하여 클래스의 TextChangedEventArgs 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| Changes |
발생한 변경 내용에 대한 정보를 포함하는 개체의 컬렉션을 가져옵니다. |
| Handled |
경로를 이동할 때 라우트된 이벤트에 대한 이벤트 처리의 현재 상태를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 RoutedEventArgs) |
| OriginalSource |
부모 클래스에서 조정 Source 하기 전에 순수 적중 테스트에 의해 결정된 원래 보고 원본을 가져옵니다. (다음에서 상속됨 RoutedEventArgs) |
| RoutedEvent |
이 RoutedEvent 인스턴스와 연결된 값을 RoutedEventArgs 가져오거나 설정합니다. (다음에서 상속됨 RoutedEventArgs) |
| Source |
이벤트를 발생시킨 개체에 대한 참조를 가져오거나 설정합니다. (다음에서 상속됨 RoutedEventArgs) |
| UndoAction |
실행 취소 스택이 이 텍스트 변경으로 인해 발생하거나 영향을 받는 방식을 가져옵니다. |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| InvokeEventHandler(Delegate, Object) |
이벤트에 대한 형식 안전 TextChangedEventHandler 대리자를 호출하는 적절한 형식 캐스팅을 수행합니다 TextChanged . |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| OnSetSource(Object) |
파생 클래스에서 재정의되는 경우 인스턴스 속성의 Source 값이 변경될 때마다 알림 콜백 진입점을 제공합니다. (다음에서 상속됨 RoutedEventArgs) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |