FreshMvvm 프레임 워크에서 Xamarin 양식을 사용하고 있습니다. 나는 Xaml에서 페이지를 만들고있다. 여러 페이지에서 다시보기 위해 콘텐츠보기를 사용하고 싶습니다.Xamarin forms : 콘텐츠보기 사용 문제
ContentView.xaml :
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Coc.Core.ContentsView">
<ContentView.Content>
<StackLayout BackgroundColor="Silver">
<SearchBar Placeholder="Search" BackgroundColor="Olive" />
</StackLayout>
</ContentView.Content>
</ContentView>
ContentView.xaml, CS :
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Coc.Core
{
public partial class ContentsView : ContentView
{
public ContentsView()
{
InitializeComponent();
}
}
}
Homepage.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="Coc.Core.StartUpPage"
xmlns:local="clr-namespace:Coc.Core;assembly=Coc.Core"
Title ="Home">
<ContentPage.Content>
<StackLayout BackgroundColor="Silver" Spacing="30" Padding ="20,50,20,10" >
<Image />
<SearchBar Placeholder="Search" />
<Label Text="Hello" TextColor="Red" Style="{StaticResource infoLabelStyle}"/>
<local:ContentsView />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Homepage.xaml.cs : 나는 페이지 홈페이지에 contentsView를 사용하려고 할 때
using System;
using System.Collections.Generic;
using FreshMvvm;c
using Xamarin.Forms;
namespace Coc.Core
{
public partial class StartUpPage : ContentPage
{
public StartUpPage()
{
InitializeComponent();
}
}
}
, 나는 오류가 점점 오전은 : 파일 또는 어셈블리 coc.core 또는 어셈블리 중 하나를로드 할 수 없습니다.
내 코드에 이상이있는 경우 누구든지 조언을 줄 수 있습니까?
감사합니다.
는 "Coc.Core"보기가있는 PCL 어셈블리의 실제 이름입니다
그래서 당신의
HomePage.xaml
처럼 볼 수 있었다? – Jason예. 네임 스페이스는 – TheDeveloper
아니요 네임 스페이스가 아닙니다. 프로젝트가 생성하는 DLL의 실제 이름. 빌드 -> 출력 아래의 프로젝트 옵션에서 "Assembly Name"을 확인하십시오. – Jason