0
我正在開發使用C#和XAML的地鐵應用程序,所以我需要一些幫助將一些XAML代碼轉換爲C#,下面的代碼在XAML中,並且工作正常,我想在C#以行和列格式將數據插入網格
<Grid x:Name="ObjRootGrid" Background="Black" Margin="248,198,227,182">
<Grid.RowDefinitions>
<RowDefinition Height="78*"/>
<RowDefinition Height="101*"/>
<RowDefinition Height="94*"/>
<RowDefinition Height="111*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="111*"/>
<ColumnDefinition Width="143*"/>
<ColumnDefinition Width="147*"/>
<ColumnDefinition Width="141*"/>
<ColumnDefinition Width="141*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="61,49,0,0" Grid.Row="1" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock Grid.Column="2" HorizontalAlignment="Left" Margin="71,45,0,0" Grid.Row="2" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" Margin="68,45,0,0" Grid.Row="2" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="106,58,0,0" Grid.Row="2" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" Margin="63,58,0,0" Grid.Row="3" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>
</Grid>
任何一個可以幫助我這個請,在此先感謝