woo****
265
2021-04-19 17:16:57
0
67

Datagrid C#



<DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="149"/>
                                    <ColumnDefinition Width="149"/>
                                    <ColumnDefinition Width="149"/>
                                    <ColumnDefinition Width="149"/>
                                </Grid.ColumnDefinitions>

                                <Border BorderBrush="{StaticResource GridLineColor}"
                                        BorderThickness="1,0,0,0"
                                        Grid.Column="1"
                                        Margin="0,-1"/>

                                <Border BorderBrush="{StaticResource GridLineColor}"
                                        BorderThickness="1,0,0,0"
                                        Grid.Column="2"
                                        Margin="0,-1"/>

                                <Border BorderBrush="{StaticResource GridLineColor}"
                                        BorderThickness="1,0,0,0"
                                        Grid.Column="3"
                                        Margin="1,-1"/>

                                <TextBlock x:Name="txbWidth"
                                           Text="{Binding 폭[0]}"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Center"/>
                                <TextBlock x:Name="txbInside"
                                           Text="{Binding 내부[0]}"
                                           Grid.Column="1"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Center"/>                                
                                <TextBlock x:Name="txbCenter"
                                           Text="{Binding 중앙[0]}"
                                           Grid.Column="2"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Center"/>
                                <TextBlock x:Name="txbOutside"
                                           Text="{Binding 외곽[0]}"
                                           Grid.Column="3"
                                           VerticalAlignment="Center"
                                           HorizontalAlignment="Center"/>

                            </Grid>


                        </DataTemplate>
</DataGridTemplateColumn.CellTemplate>



WPF Xaml의 이 코드가 C#으로 바꿀수 있을까요?

0
  • 답변 0

  • 로그인을 하시면 답변을 등록할 수 있습니다.