简体   繁体   English

为什么我在设置本地 XML 命名空间后没有得到我项目中页面的智能感知建议

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

I trying to create a an application similar to Instagram and for That i need to use tabbed pages.我试图创建一个类似于 Instagram 的应用程序,为此我需要使用选项卡式页面。 the problem is when i want to add different pages to my tabbed page using the local XML namespace I get this error " the type "local" was not found. are you missing an assembly reference and are all the assemblies have been built?".问题是当我想使用本地 XML 命名空间将不同的页面添加到我的选项卡式页面时,我收到此错误“未找到类型“本地”。您是否缺少程序集引用并且所有程序集都已构建?”。

I have already added the local xml namespace to the xaml code of my tabbed page like this "xmlns:local="cls-namespace:InstagramApp">" .我已经将本地 xml 命名空间添加到我的标签页的 xaml 代码中,例如"xmlns:local="cls-namespace:InstagramApp">"

i searched Google and only found this topic somewhat relevant https://forums.xamarin.com/discussion/22762/local-xaml-namespace-in-shared-project but it doesn't solve my problem.我搜索了谷歌,只发现这个话题有点相关https://forums.xamarin.com/discussion/22762/local-xaml-namespace-in-shared-project但它没有解决我的问题。

I also Searched stackoverflow and couldn't find any relevant topic.我还搜索了 stackoverflow 并找不到任何相关主题。

here is the xmal for the tabbed page that I am using :这是我正在使用的标签页的 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>

what i want is to get the intellisense suggestion when i type <local: Profile> , Profile is the page i want to add to my tabbed page.我想要的是在我输入<local: Profile>时获得智能感知建议,Profile 是我想添加到我的标签页的页面。 Sorry if my terminology isn't correct as it should be.对不起,如果我的术语不正确,应该是。 I am new to programming.我是编程新手。

thanks in advance.提前致谢。

I found that the problem was in the xaml namespace declaration.我发现问题出在 xaml 命名空间声明中。 i have used xmlns:local="cls-namespace:InstagramApp"> instead of xmlns:local="clr-namespace:InstagramApp"> .我使用了xmlns:local="cls-namespace:InstagramApp">而不是xmlns:local="clr-namespace:InstagramApp">

I have used an s instead of r in clr.我在 clr 中使用了 s 而不是 r。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio代码IntelliSense建议不会自动弹出 - Visual Studio Code IntelliSense suggestions don't pop up automatically 为什么我不需要在测试类文件中添加我的主项目的命名空间? - Why don't I need to add my main project's namespace in the test class files? 我设置了命名空间,但没有得到正确的xml - I set the namespace but I I don't get the correct xml 我可以加快我的代码下载XML页面的速度吗? - Can I speed up my code for downloading XML pages? 在解决方案资源管理器中更改项目文件夹后,命名空间未更新 - Namespace not updating after I alter my project folder in solution explorer 为什么不能在WP7单元测试项目中实例化我的页面之一? - Why can't I instantiate one of my Pages in a WP7 unit test project? 如何通过设置项目名称空间来摆脱xmlns =“” - How to get rid of xmlns=“” by setting project namespace 为什么智能感知不适用于我的泛型? - Why doesn't intellisense work on my Generic? Intellisense可以,但是尝试编译时出现类型或命名空间错误 - Intellisense Works But I Get Type or Namespace Errors When Trying to Compile 我的飞船有一个错误,它不想出现在我的游戏一侧,我也不知道为什么 - i have a bug with my ship, it doesn't want to appear in my game side and i dont know why
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM