簡體   English   中英

為什么我在設置本地 XML 命名空間后沒有得到我項目中頁面的智能感知建議

[英]Why dont't I get the intellisense suggestions for the pages in my project after setting up the local XML namespace

我試圖創建一個類似於 Instagram 的應用程序,為此我需要使用選項卡式頁面。 問題是當我想使用本地 XML 命名空間將不同的頁面添加到我的選項卡式頁面時,我收到此錯誤“未找到類型“本地”。您是否缺少程序集引用並且所有程序集都已構建?”。

我已經將本地 xml 命名空間添加到我的標簽頁的 xaml 代碼中,例如"xmlns:local="cls-namespace:InstagramApp">"

我搜索了谷歌,只發現這個話題有點相關https://forums.xamarin.com/discussion/22762/local-xaml-namespace-in-shared-project但它沒有解決我的問題。

我還搜索了 stackoverflow 並找不到任何相關主題。

這是我正在使用的標簽頁的 xmal:

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="InstagramApp.TabbedPage1"
            xmlns:local="cls-namespace:InstagramApp">

    <local: Profile />
</TabbedPage>

我想要的是在我輸入<local: Profile>時獲得智能感知建議,Profile 是我想添加到我的標簽頁的頁面。 對不起,如果我的術語不正確,應該是。 我是編程新手。

提前致謝。

我發現問題出在 xaml 命名空間聲明中。 我使用了xmlns:local="cls-namespace:InstagramApp">而不是xmlns:local="clr-namespace:InstagramApp">

我在 clr 中使用了 s 而不是 r。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM