【发布时间】:2011-09-15 05:43:20
【问题描述】:
如何将公共访问说明符更改为窗口内部。
<Window x:Class="MyName.MyWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
如何将访问说明符从公共更改为内部
internal partial class MyWindow : Window
{ ……………………………………………………………………………… }
此语句显示错误...具有冲突的可访问性修饰符。 如何在 WPF 中实现这一点?
【问题讨论】:
-
通过使用
x:ClassModifier="internal"指令。 -
我发现了一个副本。这是另一个:Hide control within a WPF User Control Library