TextBlock.Text 속성

정의

TextBlock의 텍스트 내용을 가져오거나 설정합니다.

public:
 property Platform::String ^ Text { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Text();

void Text(winrt::hstring value);
public string Text { get; set; }
var string = textBlock.text;
textBlock.text = string;
Public Property Text As String
<TextBlock Text="string"/>
- or -
<TextBlock>string</TextBlock>

속성 값

String

Platform::String

winrt::hstring

TextBlock의 텍스트 내용을 지정하는 문자열입니다. 기본값은 빈 문자열입니다.

설명

이 속성은 null을 사용할 수 없습니다. 그러나 이 속성을 ()로 nullTextBlock1.Text = null;설정하면 예외가 throw되지 않습니다. 대신 빈 문자열("")로 자동으로 설정됩니다.

적용 대상