本文介绍了如何在前景窗口最小化/关闭时始终设置Dialog Visible的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在WPF应用程序中,我想将对话框属性设置为始终存在于后台(windowA)中,即使它被其他人遮挡由于一些帮助按钮点击前景中的窗口,一旦前景窗口关闭(windowB),背景windowA应该是可见的,因此,我对WPF XAML代码进行了以下代码更改





WindowA的Xaml代码



Hi All,

In WPF application, I want to set dialog property to be always present in background(windowA), even though it is obscured by some other window in the foreground due to some help button click, Once the foreground window is closed (windowB) the background windowA should be visible, and hence, I had made following code changes to WPF XAML code


Xaml code for WindowA

 Window x:Class="UI.Windows.WindowA"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="windowA"  Height="410" Width="468" WindowStyle="SingleBorderWindow" ResizeMode="NoResize" Visibility="Visible" WindowStartupLocation="CenterScreen" IsTabStop="True" Background="#E8EDF0" KeyUp="Window_KeyUp">





...............











在WindowsA.Xaml.cs文件中





...............





in WindowsA.Xaml.cs file

...... 
 
publicVisibilityVisibility { get; set; } 
 
......





我在编译时得到以下错误,即使所有命名空间都是如此提到。



错误MC3029:'可见性'会员无效,因为它没有合格的类型名称





另外,我在WindowA中为XAML代码添加了以下属性



(Windows_Status =正常;可见性=可见,IsFocusable = True; IsdisplayedInTaskbar = false)



即使上述设置未启用windowA一次,当WindowB关闭时,我关闭windowB,

(总是WindowA隐藏/不可见)。



详细信息: Windows 7操作系统,VS 2010 IDE



任何解决上述问题的帮助都会非常明显,



问候,



VishalK_90



I get the below error on compilation, even though all namespaces are mentioned.

error MC3029: 'Visibility' member is not valid because it does not have a qualifying type name


Also, I had added the following attributes to XAML code in WindowA

(Windows_Status=Normal; Visibility=Visible, IsFocusable=True; IsdisplayedInTaskbar=false)

even though the above settings does not enable the windowA once, I close the windowB,
(Always WindowA is either hidden/Invisible) when WindowB is closed.

Details: Windows 7 O/S, VS 2010 IDE

Any help in resolving the above would be much appreciable,

Regards,

VishalK_90

推荐答案


这篇关于如何在前景窗口最小化/关闭时始终设置Dialog Visible的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 17:49