ItemsControl.ItemStringFormat 속성

정의

항목이 문자열로 표시되는 경우 ItemsControl 에서 항목의 서식을 지정하는 방법을 지정하는 복합 문자열을 가져오거나 설정합니다.

public:
 property System::String ^ ItemStringFormat { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string ItemStringFormat { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.ItemStringFormat : string with get, set
Public Property ItemStringFormat As String

속성 값

String

항목이 문자열로 표시되는 경우 ItemsControl 에서 항목의 서식을 지정하는 방법을 지정하는 복합 문자열입니다.

특성

예제

다음 예제에서는 개체 목록 DateTime 의 형식을 지정 하는 데 사용 ItemStringFormat 합니다.

<ListBox xmlns:sys="clr-namespace:System;assembly=mscorlib"
         ItemStringFormat="MMMM d, yyyy">
  <sys:DateTime>2004/3/4</sys:DateTime>
  <sys:DateTime>2004/8/9</sys:DateTime>
  <sys:DateTime>2005/10/14</sys:DateTime>
  <sys:DateTime>2005/4/8</sys:DateTime>
</ListBox>
  
  <!--The results when the default culture is en-US:
      March 4, 2004
      August 9, 2004
      October 14, 2005,
      April 8, 2005-->

설명

ItemStringFormat 미리 정의 된, 복합 또는 사용자 지정 문자열 형식의 수 있습니다. 문자열 형식에 대 한 자세한 내용은 참조 하세요. 형식합니다. 설정 하는 경우는 ItemTemplate 또는 ItemTemplateSelector 의 한 ItemsControl, ItemStringFormat 속성은 무시 됩니다.

적용 대상