diff --git a/Controls.SnapPanel/My Project/Application.Designer.vb b/Controls.SnapPanel/My Project/Application.Designer.vb
new file mode 100644
index 00000000..8ab460ba
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Application.Designer.vb
@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
diff --git a/Controls.SnapPanel/My Project/Application.myapp b/Controls.SnapPanel/My Project/Application.myapp
new file mode 100644
index 00000000..758895de
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Application.myapp
@@ -0,0 +1,10 @@
+
+
+ false
+ false
+ 0
+ true
+ 0
+ 1
+ true
+
diff --git a/Controls.SnapPanel/My Project/AssemblyInfo.vb b/Controls.SnapPanel/My Project/AssemblyInfo.vb
new file mode 100644
index 00000000..e76fa986
--- /dev/null
+++ b/Controls.SnapPanel/My Project/AssemblyInfo.vb
@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' Allgemeine Informationen über eine Assembly werden über die folgenden
+' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+' die einer Assembly zugeordnet sind.
+
+' Werte der Assemblyattribute überprüfen
+
+
+
+
+
+
+
+
+
+
+'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
+
+
+' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+'
+' Hauptversion
+' Nebenversion
+' Buildnummer
+' Revision
+'
+' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
+' indem Sie "*" wie unten gezeigt eingeben:
+'
+
+
+
diff --git a/Controls.SnapPanel/My Project/Resources.Designer.vb b/Controls.SnapPanel/My Project/Resources.Designer.vb
new file mode 100644
index 00000000..0ed21c20
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Resources.Designer.vb
@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+
+ 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ '''
+ ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Controls.SnapPanel.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/Controls.SnapPanel/My Project/Resources.resx b/Controls.SnapPanel/My Project/Resources.resx
new file mode 100644
index 00000000..af7dbebb
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Controls.SnapPanel/My Project/Settings.Designer.vb b/Controls.SnapPanel/My Project/Settings.Designer.vb
new file mode 100644
index 00000000..17e322ee
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Settings.Designer.vb
@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ _
+ Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "Automatische My.Settings-Speicherfunktion"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+ End Class
+End Namespace
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.DigitalData.Controls.SnapPanel.My.MySettings
+ Get
+ Return Global.DigitalData.Controls.SnapPanel.My.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/Controls.SnapPanel/My Project/Settings.settings b/Controls.SnapPanel/My Project/Settings.settings
new file mode 100644
index 00000000..85b890b3
--- /dev/null
+++ b/Controls.SnapPanel/My Project/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Controls.SnapPanel/SnapPanel.vb b/Controls.SnapPanel/SnapPanel.vb
new file mode 100644
index 00000000..4970d7bc
--- /dev/null
+++ b/Controls.SnapPanel/SnapPanel.vb
@@ -0,0 +1,56 @@
+Imports System.Drawing
+Imports System.Windows.Forms
+Public Class ClassSnapPanel
+ Inherits Panel
+
+ Private _ShowGrid As Boolean = True
+ Private _GridSize As Integer = 16
+
+ Public Property GridSize As Integer
+ Get
+ Return _GridSize
+ End Get
+ Set(value As Integer)
+ _GridSize = value
+ Refresh()
+ End Set
+ End Property
+
+ Public Property ShowGrid As Boolean
+ Get
+ Return _ShowGrid
+ End Get
+ Set(value As Boolean)
+ _ShowGrid = value
+ Refresh()
+ End Set
+ End Property
+
+ Protected Overrides Sub OnControlAdded(e As ControlEventArgs)
+ AddHandler e.Control.LocationChanged, AddressOf AlignToGrid
+ AddHandler e.Control.DragDrop, AddressOf AlignToGrid
+ MyBase.OnControlAdded(e)
+ End Sub
+
+ Protected Overrides Sub OnControlRemoved(e As ControlEventArgs)
+ RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid
+ RemoveHandler e.Control.DragDrop, AddressOf AlignToGrid
+ MyBase.OnControlRemoved(e)
+ End Sub
+
+ Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs)
+ If _ShowGrid Then
+ ControlPaint.DrawGrid(e.Graphics, ClientRectangle, New Size(_GridSize, _GridSize), BackColor)
+ End If
+ MyBase.OnPaint(e)
+ End Sub
+
+ Private Sub AlignToGrid(sender As Object, e As EventArgs)
+ If _ShowGrid Then
+ Dim item As Control = CType(sender, Control)
+ Dim x As Integer = Math.Round(item.Left / _GridSize) * _GridSize
+ Dim y As Integer = Math.Round(item.Top / _GridSize) * _GridSize
+ item.Location = New Point(x, y)
+ End If
+ End Sub
+End Class
diff --git a/Controls.SnapPanel/SnapPanel.vbproj b/Controls.SnapPanel/SnapPanel.vbproj
new file mode 100644
index 00000000..3b918432
--- /dev/null
+++ b/Controls.SnapPanel/SnapPanel.vbproj
@@ -0,0 +1,109 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {3E19C413-3197-4635-944E-558FC04C3475}
+ Library
+ DigitalData.Controls.SnapPanel
+ DigitalData.Controls.SnapPanel
+ 512
+ Windows
+ v4.7.2
+ true
+
+
+ true
+ full
+ true
+ true
+ bin\Debug\
+ DigitalData.Controls.SnapPanel.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ pdbonly
+ false
+ true
+ true
+ bin\Release\
+ DigitalData.Controls.SnapPanel.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ Application.myapp
+ True
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ Component
+
+
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+ Designer
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+ SettingsSingleFileGenerator
+ My
+ Settings.Designer.vb
+
+
+
+
\ No newline at end of file