我正在使用 C# 和 XAML 开发 Metro 应用程序,所以我需要一些帮助来将一些 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>
任何人都可以帮我解决这个问题,在此先感谢