私はWPFでプログラミングしています。DataGrid コントロールで、セルの中央のコンテンツを作成する方法が必要です。私もこのコードを使用します:
<DataGrid x:Name="dg1" HorizontalAlignment="Left" Margin="10,10,0,0"
VerticalAlignment="Top" Height="360" Width="498"
FontFamily="2 Badr" FontSize="18"
AlternatingRowBackground="LightCoral" FlowDirection="RightToLeft"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
Background="{x:Null}"/>
なにが問題ですか?