'창'에 대한 상속에 문제가 있습니다. 문제가 무엇인지 이해하지 못합니까? 내가 생각C# - 상속 WPF 레이아웃 - 창에서 창
, 내 레이아웃 (MediaLibrary.xaml)은 MainWindow를의 상속이 ...하지만 난 그렇게 할 방법을 알고하지 않습니다
MainWindow.xaml :/
2 개 클래스가 있습니다
<Window x:Class="WindowsMediaPlayerV2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MyWindowsMediaPlayer v2" Height="350" Width="525" MinHeight="350" MinWidth="525">
<Grid>
</Grid>
</Window>
MainWindow.xaml.cs를
namespace WindowsMediaPlayerV2
{
public partial class MainWindow : Window
{
public MediaLibrary myMediaLibrary = new MediaLibrary();
public MainWindow()
{
InitializeComponent();
}
}
}
MediaLibrary.xaml
<Window x:Class="WindowsMediaPlayerV2.MediaLibrary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MediaLibrary" Height="350" Width="300" MinHeight="350" MinWidth="300" Closing="Window_Closing">
<Grid>
</Grid>
</Window>
MediaLibrary.xaml.cs 내가 실행
namespace WindowsMediaPlayerV2
{
public partial class MediaLibrary : MainWindow //problem here when I run
{
public MediaLibrary()
{
InitializeComponent();
}
}
}
오류 :
FR : 레 선언 partielles 드 'WindowsMediaPlayerV2.MediaLibrary'네브라스카 기본 교과 과정을 배우는 도우미
EN : 'WindowsMediaPlayerV2.MediaLibrary'의 일부 선언은 다른 기본 클래스를 지정하면 안됩니다. Google에서 도와 드릴까요? 감사합니다.