如何使用WPF开发将具有常规窗口所有属性的自定义窗口 [英] How to develop a custom window which will have all the Properties of general window using WPF

查看:117
本文介绍了如何使用WPF开发将具有常规窗口所有属性的自定义窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我将开发自己的窗口,其中将有自己的字幕按钮(最小化,最大化,还原和关闭)以及与这些按钮相关的所有属性,并且可以在窗口的标题位置添加任何控件. />
请给我建议我将如何进行下去的方式...

在此先感谢



更新:
首先,我对我的迟到表示歉意,并非常感谢您的积极回复.实际上,我想开发一个与Google Chrome浏览器非常相似的Windows应用程序,在该应用程序中,我将在自定义窗口"中放置一个Tab控件.我需要知道如何获取窗口的自定义模板...

Hi All

I am going to develop my own window where I''ll have my own Caption Buttons (Minimize, Maximize, Restore and Close) and all the properties related to these buttons and can add any control at the title position of the window.

Suggest me the way how I''ll proceed for it please......

Thanks in advance



Update:
Hi first of all I apologies for my late response and Thanks a lot for your active responses. Actually I want to develop a windows application which will be very similar to Google Chrome web browser and in that application, I''ll place a Tab Control within my Customized Window. I need to know how to go for a custom template of a window…

推荐答案

Apurva3633写道:
Apurva3633 wrote:

至少告诉我使用this(Windows控件)如何为自定义窗口制作控件模板,如果您有任何示例,请参阅给我. -

At least tell me by using this(Windows Controls) how can I make a Control template for my customize window, if u have any sample then please refer it to me. -



我不确定你的意思是什么.您需要查看标准的窗口控件,然后选择将在您的应用程序中完成所需功能的控件.如果应用程序的某些方面没有标准窗口,则需要自己创建它.

从一个简单的窗口(即没有专门功能)开始,它将作为您的框架窗口.根据需要添加子窗口,以在应用程序中提供所需的功能.例如,要提供一个显示某种列表的窗口,您可以添加一个列表查看 [^ ].如果要使用选项卡式窗口,请添加标签 [



I''m not sure what you mean by this. You need to look at the standard window controls and select the one(s) that will do what you need in your application. If there is not a standard window for some aspect of the application then you need to create it yourself.

Start with a simple window (i.e. no specialised features) which will act as your frame window. Add child window(s) as necessary to provide the features you want in your application. For example, to provide a window that shows a list of some sort you would add a List View[^]. If you want tabbed windows then add a Tab[^] control. Continue on until your application is complete.


将窗口WindowStyle 设置为None,然后自己接管图形.我有一个示例此处 [
Set your window WindowStyle to None, and then take over the drawing yourself. I have a sample here[^] that demonstrates how to accomplish this.


尝试一些CodeProject文章,查看 Windows控件 [
Try some of the CodeProject articles, look at Windows Controls[^] in MSDN, try searching Google, etc. You are asking for a huge amount of information in one question, so it is impossible to give a more specific answer.


这篇关于如何使用WPF开发将具有常规窗口所有属性的自定义窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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