3
我有一个窗口,它是这样如何创建其他窗口继承的窗口?
<Window x:Class="pharmacy_Concept.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button Content="Login" Height="34" HorizontalAlignment="Left" Margin="12,241,0,0" Name="loginbutton" VerticalAlignment="Top" Width="129" Click="loginbutton_Click" />
<Button Content="Exit" Height="34" HorizontalAlignment="Left" Margin="362,241,0,0" Name="Exitbutton" VerticalAlignment="Top" Width="129" Click="Exitbutton_Click" />
</Grid>
</Window>
我想我已经创建了这个layout.Do我必须使用一个资源字典this.If所以如何每一个新的窗口?还是我要做别的事
这只是为了把握这个概念。我将在以后使用图像和标签。
它说我应该添加一个X:class属性 – deception1 2012-03-25 06:47:26
确实应该添加另一个类来处理事件在您的资源文件 – ionden 2012-03-25 06:49:40
和Style =“{StaticResource {x:Type Window}}” 也表示必须具有非null值setter.property – deception1 2012-03-25 06:53:20