ModernUI所有页面的相同页脚

ModernUI所有页面的相同页脚

本文介绍了WPF ModernUI所有页面的相同页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to implement something-like-footer (same content/page for whole app) in my ModernUI WPF app. In mainwindow.xaml I have basic Menu (expanded examples)

    <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>

我尝试将<mui:ModernWindow.MenuLinkGroups>添加到网格元素,但是我得到成员"MenuLinkGroups"无法识别或无法访问的错误.

I have tried adding <mui:ModernWindow.MenuLinkGroups> to grid element, however I get The member "MenuLinkGroups" is not recognized or is not accessible error.

我还尝试过使用<mui:ModernFrame>元素并在</mui:ModernWindow.MenuLinkGroups>之后添加具有恒定内容的源,但是它不起作用(它根本不呈现).

I have also tried using <mui:ModernFrame> element and adding source with my constant content, after </mui:ModernWindow.MenuLinkGroups> however it doesn't work (it isn't rendered at all).

对于在ModernUI中获得页脚之类的任何想法或建议,我们深表感谢.

Any ideas or advices how to get something like footer in ModernUI are highly appreciated.

非常感谢!

推荐答案

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

You need to modify the ModernWindow style and template. There is a good tutorial here:

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

这篇关于WPF ModernUI所有页面的相同页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:08