我基于Window控件创建了一个新的CustomControl。
但是当我使用我的控件时,它在设计模式下没有出现,而是仍然使用默认的窗口样式。
我该如何强制设计器显示我的窗口样式而不是默认样式?
但是当我使用我的控件时,它在设计模式下没有出现,而是仍然使用默认的窗口样式。
我该如何强制设计器显示我的窗口样式而不是默认样式?
我的MainWindow.xaml:
<CustomWindow:MetroWindow x:Class="Testz.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:CustomWindow="clr-namespace:MetroWindow;assembly=MetroWindow"
Title="MainWindow" Height="350" Width="525" BorderBrush="Red">
<Grid>
</Grid>
</CustomWindow:MetroWindow>
在设计师中的样子和实际效果图: