TextCompositionEventArgs 클래스를 이해하지 못합니다.WPF : 클래스 TextCompositionEventArgs을 (를) 이해할 수 없습니다.
ControlText, SystemText, Text라는 문자열 형식의 멤버가 있습니다. 그런 다음 ControlText, SystemText 및 Text 멤버를 다시 포함하고 SystemCompositionText 및 CompositionText 필드를 포함하는 TextConmposistion 필드가 있습니다.
public class TextCompositionEventArgs : InputEventArgs
{
..
public string ControlText { get; }
public string SystemText { get; }
public string Text { get; }
public TextComposition TextComposition { get; }
}
public class TextComposition : DispatcherObject
{
..
public string CompositionText { get; protected set; }
public string ControlText { get; protected set; }
public string SystemCompositionText { get; protected set; }
public string SystemText { get; protected set; }
public string Text { get; protected set; }
}
두 텍스트 구성원이 키보드로 입력 한 텍스트를 포함하는 것, 다른 모든 필드는 빈 문자열이 포함되어 있습니다.
이 필드는 어떤면에서 차이가 있으며 무엇에 좋은가요?
TextCompositionEventArgs 클래스에서 ControlText, SystemText, Text가 중복/중복되는 이유를 알고 계십니까? – codymanix
그들은 그렇지 않습니다. 예를 들어 ControlText는 Ctrl 키를 누를 때 발생하는 테스트입니다. 이러한 키 입력은 텍스트에 표시되지 않습니다. –
중복 된/중복으로 무엇을 의미하는지 알 수 있도록 내 질문과 삽입 된 코드를 편집했습니다. – codymanix