在标题栏上添加按钮,例如ms office 2007 [英] Adding Button on the title bar like ms office 2007

查看:73
本文介绍了在标题栏上添加按钮,例如ms office 2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我想创建一个窗口应用程序,在其中我要在标题栏上添加按钮(例如ms Office 2007),而在Windows XP和Windows 7上的应用应该类似于MS Office 7.是否需要使用功能区来这样做?

Hi...

I want to create a window application in which I want to add button on the title bar like ms office 2007 and the apprience on window xp and on window 7 should be like ms office 7. Can anyone help me to do so. Is it necessary to use Ribbon to do so?

Thanks

推荐答案

I have done it by using Micosoft.windows.Shell.dll but it workes only on windows 7 not in windows xp It is because of GlassFrameThickness attribut if I set it -1 it workes properly else the minimize, maximize and close buttons are disabled.How can I solve this problem. The code I have used is given below-

 <Window.Resources>
        <Style x:Key="GlassStyle" TargetType="{x:Type local:Window1}">
            <Setter Property="shell:WindowChrome.WindowChrome">
                <Setter.Value>
                    <shell:WindowChrome GlassFrameThickness="-1" ResizeBorderThickness="6" CaptionHeight="40" CornerRadius="6,0,6,20" />
                </Setter.Value>
            </Setter>
</Window.Resources>


这篇关于在标题栏上添加按钮,例如ms office 2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆