【发布时间】:2017-03-04 09:41:40
【问题描述】:
我遇到了一个奇怪的问题,当我将内容页面设置为启动页面时,Xamarin Forms App 工作正常。如果我将 TabbedPage 设置为启动并将 ContentPage 设置为 TabbedPage 的子项,则它不会显示/数据绑定 ContentPage。没有错误。我想念什么?这是我的 TabbedPage 视图模型。
using MvvmCross.Core.ViewModels;
using System.Windows.Input;
namespace Company.Mobile.ViewModels
{
public class TabbedMainViewModel
: MvxViewModel
{
}
}
XAML:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:forms="using:Xamarin.Forms"
xmlns:local="clr-namespace:company.Mobile.Pages;assembly=company.Mobile"
x:Class="company.Mobile.Pages.TabbedMainPage"
Title="Title">
<TabbedPage.Children>
<local:HomePage/>
<local:MainPage/>
<local:ResourcesPage/>
<local:ContactPage/>
</TabbedPage.Children>
</TabbedPage>
【问题讨论】:
-
嗨,我知道它很久以前了。但是,您是否遇到过在 MvvmCross xamarin 表单中使用选项卡式页面的任何解决方案。
标签: android xamarin visual-studio-2015 xamarin.forms mvvmcross