【问题标题】:Xamarin.Forms.Xaml.XamlParseException: Cannot assign property "IsVisable" : Property does not exists [closed]Xamarin.Forms.Xaml.XamlParseException:无法分配属性“IsVisable”:属性不存在 [关闭]
【发布时间】:2017-07-11 01:17:02
【问题描述】:
    <?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="XamlTest.HelloXamlPage">
  <Label Text="Hello, XAML!"
         VerticalOptions="Start"
         HorizontalTextAlignment="Center"
         Rotation="-15"
         IsVisable="true"
         FontSize="Large"
         FontAttributes="Bold"
         TextColor="Black"
         />
</ContentPage>

这是一个基本示例,但问题是这段代码写在另一个 Forms XAML 页面上,而不是默认的主 XAML 页面 (MainPage.xaml),默认的运行良好,没有问题,但另一个 XAML 页面不工作,给我这个例外:

Xamarin.Forms.Xaml.XamlParseException:位置 9:10。无法分配 属性“IsVisable”:属性不存在,或不可分配, 或者值和属性的类型不匹配

我已经更改了公共应用程序中的代码

public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            MainPage = new XamlTest.HelloXamlPage(); // called HelloXamlPage instead of MainPage();
        }

调用 HelloXamlPage 而不是 MainPage(); 所以任何人都可以帮助我吗?

【问题讨论】:

  • 你打错字了——IsVisible

标签: c# xaml xamarin xamarin.forms cross-platform


【解决方案1】:

它看起来像一个错字。将IsVisable 更改为IsVisible

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2015-12-07
  • 2019-03-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-18
  • 1970-01-01
  • 2019-06-20
相关资源
最近更新 更多