'宣言 Public Property PostTabItemContentTemplate As DataTemplate
public DataTemplate PostTabItemContentTemplate {get; set;}
Class Window1 Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. ' Set the content of the pre-tab item area. Me.XamTabControl1.PreTabItemContent = "Pre tab area content" ' Set the DataTemplate for the pre-tab item area. Me.XamTabControl1.PreTabItemContentTemplate = TryCast(Me.TryFindResource("PreTabItemTemplate"), DataTemplate) ' Set the content of the post-tab item area. Me.XamTabControl1.PostTabItemContent = "Post tab area content" ' Set the DataTemplate for the post-tab item area. Me.XamTabControl1.PostTabItemContentTemplate = TryCast(Me.TryFindResource("PostTabItemTemplate"), DataTemplate) End Sub
public partial class Window1 : Window { public Window1() { InitializeComponent(); // Set the content of the pre-tab item area. this.xamTabControl1.PreTabItemContent = "Pre tab area content"; // Set the DataTemplate for the pre-tab item area. this.xamTabControl1.PreTabItemContentTemplate = this.TryFindResource("PreTabItemTemplate") as DataTemplate; // Set the content of the post-tab item area. this.xamTabControl1.PostTabItemContent = "Post tab area content"; // Set the DataTemplate for the post-tab item area. this.xamTabControl1.PostTabItemContentTemplate = this.TryFindResource("PostTabItemTemplate") as DataTemplate; }