【问题标题】:How can I make a master page for all of my pages like default page in Zebble for Xamarin?如何为我的所有页面制作母版页,例如 Zebble for Xamarin 中的默认页面?
【发布时间】:2017-10-10 18:49:25
【问题描述】:

当我在 Zebble 文档网站上阅读如下代码时,我创建了一个新的空白页面,但我需要在我的所有页面上使用它,并且我不想在我的所有页面上重复该设计。当我尝试构建我的项目时,会出现如下错误:

<z-Component z-type="Page1" z-base="Page" z-namespace="UI.Pages"
z-partial="true" Title="Page 1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./../.zebble-schema.xml">

  <Stack Id="Header" Direction="Horizontal">
     <Button  Text="MyToogleMenuBtn" />
     <TextView Text="MyPageTitle" />
     <Button Text="AddBtn" />
  </Stack>
  <Stack Id="Body">

  </Stack>
  <Stack Id="Footer">
     <Button Id="ConfirmBtn"  />
  </Stack>

/z-Component>

错误是:

error screen shot

但我不知道应该在哪里添加 title 属性。

【问题讨论】:

  • 尝试将错误包含在您的帖子中,这会使帖子更易于阅读。

标签: c# .net xamarin xamarin-zebble zebble


【解决方案1】:

要将此页面用作其他页面的模板,您只需将其指定为z-base

<z-Component z-type="MyChildPage" z-base="MyTemplate" ...

至于错误,您应该删除Title="Page 1",因为当前页面中没有Title 属性

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-05-17
    • 2012-06-26
    • 1970-01-01
    • 1970-01-01
    • 2010-12-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多