Share via


자리 표시자 확장

확장은 Placeholder 컨트롤 구성 IPlaceholder 을 지원하는 일련의 확장 메서드를 제공합니다.

확장은 다음 메서드를 제공합니다.

자리 표시자Color

메서드는 PlaceholderColor 요소의 PlaceholderColor 속성을 IPlaceholder 설정합니다.

다음 예제에서는 다음으로 PlaceholderColorColors.Red설정합니다.

new Entry().PlaceholderColor(Colors.Red);

자리 표시자

메서드는 Placeholder 요소의 Placeholder 속성을 IPlaceholder 설정합니다.

다음 예제에서는 다음으로 Placeholder"Enter Text"설정합니다.

new Entry().Placeholder("Enter Text");

요소의 속성과 PlaceholderColor 속성을 둘 다 Placeholder 설정하는 두 번째 오버로드 메서드 PlaceholderIPlaceholder 있습니다.

다음 예제에서는 to 및 to를 "Address, City, State"PlaceholderColorColors.Grey설정합니다.Placeholder

new Editor().Placeholder("Address, City, State", Colors.Grey);