'宣言 Public Shared ReadOnly AllowDockingFloatingProperty As DependencyProperty
public static readonly DependencyProperty AllowDockingFloatingProperty
Imports Infragistics.Windows.DockManager Private Sub InitializeDmFloating(ByVal dockManager As XamDockManager) ' There are two floating states - Floating ' Dockable and Floating Only. AllowDockingFloating ' can be used to determine if the end user can ' put the pane into a floating dockable state ' which can be done by dragging a docked pane or ' double clicking its caption. AllowFloatingOnly ' is used to determine if the user can right click ' on a pane and choose floating. ' Dim cpNoFloatDock As New ContentPane() cpNoFloatDock.Header = "No Floating Dockable" cpNoFloatDock.AllowDockingFloating = False Dim tbNoDock As New TextBlock() tbNoDock.TextWrapping = TextWrapping.Wrap tbNoDock.Text = "You can right click and choose 'Floating' to go into floating only " + "but cannot drag or double click the caption to go into a dockable floating state." Dim cpNoFloatOnly As New ContentPane() cpNoFloatOnly.Header = "No Floating Only" cpNoFloatOnly.AllowFloatingOnly = False Dim tbNoOnly As New TextBlock() tbNoOnly.TextWrapping = TextWrapping.Wrap tbNoOnly.Text = "You can drag the pane or double click the caption to make it floating" + " dockable but cannot right click and choose 'Floating' to make it floating only." Dim split As New SplitPane() split.Panes.Add(cpNoFloatDock) split.Panes.Add(cpNoFloatOnly) dockManager.Panes.Add(split) End Sub
using Infragistics.Windows.DockManager; private void InitializeDmFloating(XamDockManager dockManager) { // There are two floating states - Floating // Dockable and Floating Only. AllowDockingFloating // can be used to determine if the end user can // put the pane into a floating dockable state // which can be done by dragging a docked pane or // double clicking its caption. AllowFloatingOnly // is used to determine if the user can right click // on a pane and choose floating. // ContentPane cpNoFloatDock = new ContentPane(); cpNoFloatDock.Header = "No Floating Dockable"; cpNoFloatDock.AllowDockingFloating = false; TextBlock tbNoDock = new TextBlock(); tbNoDock.TextWrapping = TextWrapping.Wrap; tbNoDock.Text = "You can right click and choose 'Floating' to go into floating only " + "but cannot drag or double click the caption to go into a dockable floating state."; ContentPane cpNoFloatOnly = new ContentPane(); cpNoFloatOnly.Header = "No Floating Only"; cpNoFloatOnly.AllowFloatingOnly = false; TextBlock tbNoOnly = new TextBlock(); tbNoOnly.TextWrapping = TextWrapping.Wrap; tbNoOnly.Text = "You can drag the pane or double click the caption to make it floating" + " dockable but cannot right click and choose 'Floating' to make it floating only."; SplitPane split = new SplitPane(); split.Panes.Add(cpNoFloatDock); split.Panes.Add(cpNoFloatOnly); dockManager.Panes.Add(split); }