如何将UIelements设为只读
我需要在Mainwindow顶部显示诸如popup 之类的userconrol,...同时显示我正在破坏所有UI元素,如
I have a requirement to display the userconrol like popup on top of Mainwindow,...while displaying i am disabuling the all UI elements like
foreach(UIElementitem inmodalGrid.Children)
foreach (UIElementitem inmodalGrid.Children)
item.IsEnabled = false;
modalGrid.Children.Add(uc);
item.IsEnabled = false;
modalGrid.Children.Add(uc);
代码工作正常,但是问题是我也要在散布后显示所有UIelements看起来也很正常.它不应该更改颜色(它应该看起来像Readonly)
Code is working fine,but the problem is i want to display all the UIelements looks like normal after disabuling also.it should not change the color(it should looks Like Readonly )
请让我知道是否可以在WPF中更改消失的UIElement的颜色?
Please let me know is it posibule to change the color for disabuled UIElements in WPF ?
在您的MainWindow中,只需设置IsEnabled = "False",这将禁用与Window内容的所有交互.
In your MainWindow, just set the IsEnabled="False", this will disable all interaction with the content of the Window.