Imports System.Windows.Forms.Integration Imports EgtUILib Public Class WinFormPluginControlVM Inherits BasePanelVM Private m_WinFormUserControl As Forms.Control Public ReadOnly Property WinFormUserControl As Forms.Control Get Return m_WinFormUserControl End Get End Property Private m_DockSide As Dock Public ReadOnly Property DockSide As Dock Get Select Case TryCast(m_WinFormUserControl, IPluginControl).DockSide Case Forms.DockStyle.Top Return Dock.Top Case Forms.DockStyle.Bottom Return Dock.Bottom Case Forms.DockStyle.Left Return Dock.Left Case Forms.DockStyle.Right Return Dock.Right Case Else Return Nothing End Select End Get End Property Public ReadOnly Property Height As Double Get Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Left Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Right, Double.NaN, m_WinFormUserControl.Height) End Get End Property Public ReadOnly Property Width As Double Get Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Top Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Bottom, Double.NaN, m_WinFormUserControl.Width) End Get End Property Sub New(WinFormControl As Forms.Control, ViewPanelState As ViewPanelStates) m_WinFormUserControl = WinFormControl ' imposto visibilita' standard SetPanelViewState(ViewPanelState) End Sub End Class