相关疑难解决方法(0)

Xamarin上的黑屏

我有一个Xamarin便携式项目。
我调试的Xaml页面完全空白,在Android和IOS上的页面上都看不到任何组件。

我怎样才能解决这个问题?

注意:没有任何错误消息,页面正在打开,我看不到任何内容。
发生此错误出现了问题。当我修复它时,
尽管调试的页面在InitializeComponent错误之前仍在工作,但它们打开的页面还是空的。

任何帮助将不胜感激。

这是我的xaml:

<?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="AcikAkademi3.Layoutlar.GridOrnek3">

<Grid>
  <Grid.RowDefinitions>  
    <RowDefinition Height="*"></RowDefinition>
    <RowDefinition Height="*"></RowDefinition>
  </Grid.RowDefinitions>

  <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*"></ColumnDefinition>
    <ColumnDefinition Width="*"></ColumnDefinition>
    <ColumnDefinition Width="Auto"></ColumnDefinition>
  </Grid.ColumnDefinitions>

  <Label BackgroundColor="Red" Text="0,0" Grid.Column="0" Grid.Row="0">
  </Label>
  <Label BackgroundColor="Blue" Text="1,0" Grid.Column="1" Grid.Row="0">
  </Label>
  <Label BackgroundColor="Yellow" Text="Aç?k Akademi" Grid.Column="2" Grid.Row="0"></Label>

  <Label BackgroundColor="White" Text="0,1" Grid.Column="0" Grid.Row="1">
  </Label>
  <Label BackgroundColor="Silver" Text="1,1" Grid.Column="1" Grid.Row="1">
  </Label>
  <Label BackgroundColor="Lime" Text="2,1" Grid.Column="2" Grid.Row="1">
  </Label>

</Grid>
</ContentPage>
Run Code Online (Sandbox Code Playgroud)

这是我的CS:

using System;
using System.Collections.Generic;
using …
Run Code Online (Sandbox Code Playgroud)

xaml initializecomponent xamarin.ios xamarin.android xamarin

2
推荐指数
1
解决办法
3037
查看次数