WPF里关于继承基类
namespace TwoToOnePokerGame
{
/// <summary>
/// Interaction logic for frmWinGame.xaml
/// </summary>
public partial class FormWinGame: DialogWindowBase
{
public FormWinGame()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
((MainForm)ParentWindow).StartNewGame();
this.Close();
}
private void button2_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
public override string MessageStr
{
get
{
return base.MessageStr;
}
set
{
txtMessage.Text = value;
base.MessageStr = value;
}
}
}
}
其中这个窗口名为FormWinGame,DialogWindowBase为一个类
提示“TwoToOnePokerGame.FormWinGame”的分部声明一定不能指定不同的基类