'宣言 Public Shared ReadOnly ImageProperty As DependencyProperty
public static readonly DependencyProperty ImageProperty
Imports Infragistics.Windows.DockManager Private Sub InitializeDmWithCP(ByVal dockManager As XamDockManager) Dim split As New SplitPane() Dim cp As New ContentPane() cp.Header = "Caption Text" ' The TabHeader can be excluded and will default ' to the value of the Header. cp.TabHeader = "Tab Text" cp.IsPinned = False ' the following assumes you have a resource image in the root ' of the application with the name panePic.bmp Dim uri As New Uri("pack://application:,,,/panePic.bmp") cp.Image = New BitmapImage(uri) split.Panes.Add(cp) dockManager.Panes.Add(split) End Sub
using Infragistics.Windows.DockManager; private void InitializeDmWithCP(XamDockManager dockManager) { SplitPane split = new SplitPane(); ContentPane cp = new ContentPane(); cp.Header = "Caption Text"; // The TabHeader can be excluded and will default // to the value of the Header. cp.TabHeader = "Tab Text"; cp.IsPinned = false; // the following assumes you have a resource image in the root // of the application with the name panePic.bmp Uri uri = new Uri("pack://application:,,,/panePic.bmp"); cp.Image = new BitmapImage(uri); split.Panes.Add(cp); dockManager.Panes.Add(split); }