【问题标题】:WPF ModernUI same footer for all pagesWPF ModernUI 所有页面的页脚相同
【发布时间】:2014-05-11 18:12:28
【问题描述】:

我正在尝试在我的 ModernUI WPF 应用程序中实现类似页脚(整个应用程序的相同内容/页面)。在 mainwindow.xaml 我有基本菜单(扩展示例)

    <mui:ModernWindow.MenuLinkGroups>
        <mui:LinkGroup DisplayName="Sports">
            <mui:LinkGroup.Links>
                <mui:Link DisplayName="Home" Source="/Pages/Home.xaml"/>
                <mui:Link DisplayName="Football" Source="/Pages/Sports/Football.xaml" />
                <mui:Link DisplayName="Handball" Source="/Pages/Sports/Handball.xaml" />
                <mui:Link DisplayName="Basketball" Source="/Pages/Sports/Basketball.xaml" />
                <mui:Link DisplayName="Tennis" Source="/Pages/Sports/Tennis.xaml" />
                <mui:Link DisplayName="Volleyball" Source="/Pages/Sports/Volleyball.xaml" />
                <mui:Link DisplayName="Beach handball" Source="/Pages/Sports/BeachHandball.xaml" />
                <mui:Link DisplayName="General settings" Source="/Pages/Settings.xaml" />
                <mui:Link DisplayName="About" Source="/Pages/About.xaml" />
            </mui:LinkGroup.Links>
        </mui:LinkGroup>
    </mui:ModernWindow.MenuLinkGroups>

我尝试将&lt;mui:ModernWindow.MenuLinkGroups&gt; 添加到网格元素,但是我得到了成员“MenuLinkGroups”无法识别或无法访问错误。

编辑:

我也尝试过使用&lt;mui:ModernFrame&gt; 元素并在&lt;/mui:ModernWindow.MenuLinkGroups&gt; 之后使用我的常量内容添加源,但是它不起作用(根本没有呈现)。

非常感谢任何关于如何在 ModernUI 中获得类似页脚的想法或建议。

非常感谢!

【问题讨论】:

  • 您的&lt;mui:ModernWindow.MenuLinkGroups&gt; 嵌套在什么元素中? Grid?是否设置了Grid.RowDefinitions
  • 不, 不能在网格中,正如我所写的那样,因为它出现错误,并且根据作者的说明,网格元素根本不能在 mui 中使用:现代之窗。目前我正在根据我的需要修改 ModernUI 源代码(以实现页脚功能),因为这是我找到的唯一可能的解决方案。
  • 伊万:结果如何?
  • @lahjaton_j 我刚刚浏览了收件箱中的评论历史记录并看到了您的评论。我很抱歉,我不知道我是怎么错过的。可悲的是,我认为我没有源代码了,因为我的朋友(我为之工作)放弃了这个项目的工作。据我所知,我已经分叉了 ModernUI 来修改源代码并添加了我的页脚元素。如果您仍然需要一些提示,我可以尝试挖掘源代码,如果它位于某个地方。
  • 没关系,切换到mahapps。老实说,这两个库都有些缺乏功能,尤其是在文档方面。

标签: c# wpf modern-ui


【解决方案1】:

您需要修改 ModernWindow 样式和模板。这里有一个很好的教程:

http://www.c-sharpcorner.com/UploadFile/3789b7/modern-ui-for-wpf-application-by-example-default-window-wit/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-04-26
    • 2022-12-18
    • 1970-01-01
    • 2018-10-10
    • 2016-01-24
    • 1970-01-01
    • 2016-04-30
    • 1970-01-01
    相关资源
    最近更新 更多