根据活动窗口禁用和启用工具栏按钮 [英] Disable and Enable toolbar buttons based on active window

查看:111
本文介绍了根据活动窗口禁用和启用工具栏按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。


我一直在使用C#和WPF开发CRM软件。主窗口具有基本功能的工具栏,如新建,打开,保存,全部保存,另存为,打印和打印预览。


在大多数常见软件中,这些按钮被禁用或启用基于每次都活跃(或聚焦)的窗口。如果您打开表单,则无法打印报告,例如,在预览报告时也无法按下新按钮。


有人可以指向我的博文或一个演练用什么方法来实现这样的功能?我假设您可以在开发过程中实现一种方法,而不是专门在每个窗口中的工具栏中开发特定按钮。




SigurðurHAlfhildars

解决方案

您好,


这是WPF我正在将您的问题转移到WPF论坛。


Hello.

I have been developing in C# and WPF an CRM software. The Main Window have toolbar with basic function like New, Open, Save, Save All, Save As, Print and Print Preview.

In most common software these buttons are disable or enable based on the window who is active (or in focus) each time. You can not print out report if you have open a form, also you can not push on new button when you are previewing a report for example.

Can someone point me to a blog post or a walk-through what approaches are used to implement features like this? I assume that you can implement an approach in developing instead developing specific button in the toolbar in every single window specifically.


Sigurður H Alfhildars

解决方案

Hello,

Being this is WPF I'm moving your question to the WPF forum.


这篇关于根据活动窗口禁用和启用工具栏按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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