2011-12-20 2 views

답변

30

샘플 코드가없는 답변은별로 도움이되지 않습니다. 이 옵션을 사용합니다 :

<DataGridTextColumn Header="Name" Binding="{Binding Name}"> 
    <DataGridTextColumn.ElementStyle> 
     <Style TargetType="{x:Type TextBlock}"> 
      <Setter Property="Margin" Value="5" /> 
      <Setter Property="Padding" Value="10" /> 
     </Style> 
    </DataGridTextColumn.ElementStyle> 
</DataGridTextColumn> 

x 접두사 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"에서 온다

. 공개 Name 속성이있는 비즈니스 개체를 사용했습니다.