3
"FileName"이라는 재정의 가능한 속성이 포함 된 페이지가 있습니다. 전체 페이지를 만들고 같은 페이지를 갖지만 다른 파일 이름을 갖도록 상속합니다.WPF 페이지에서 상속
이것이 가능합니까?
대문 XAML :
<Page x:Class="Batcher_File"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:my="clr-namespace:TB_InstallSystem"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="600"
Title="Batcher">
</Page>
Codebehind가 :
Class Batcher_File
Private _fiBatch As New IO.FileInfo(TB.SystemMain.AppPath & "myfile.xml")
Public Overridable Property fiBatch As IO.FileInfo
Get
Return _fiBatch
End Get
Set(value As IO.FileInfo)
_fiBatch = value
End Set
End Property
End Class
번째 페이지 XAML ?? :
<!-- -->
번째 페이지 Codebehind가 :
Public Class Batc_After
Inherits Batcher_Filer
Private _fiBatch As New IO.FileInfo(TB.SystemMain.AppPath & "batch_after.xml")
Public Overrides Property fiBatch As IO.FileInfo
Get
Return _fiBatch
End Get
Set(value As IO.FileInfo)
_fiBatch = value
End Set
End Property
End Class