From 8f1a9750425b23ac1f285592ffc7d094d66ed7c3 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Mon, 6 Sep 2021 17:16:19 +0300 Subject: [PATCH 1/3] autogenerate VB --- VB/Application.xaml | 2 +- VB/Application.xaml.vb | 4 +- VB/Helpers/GlyphHelper.vb | 11 ++- VB/MainWindow.xaml | 2 +- VB/MainWindow.xaml.vb | 4 +- VB/My Project/AssemblyInfo.vb | 7 +- VB/My Project/Resources.Designer.vb | 34 ++++----- VB/My Project/Settings.Designer.vb | 8 +-- VB/View/DocumentView.xaml | 2 +- VB/View/DocumentView.xaml.vb | 4 +- VB/View/PanelView.xaml | 2 +- VB/View/PanelView.xaml.vb | 4 +- VB/ViewModel/DocumentViewModel.vb | 48 +++---------- VB/ViewModel/MainViewModel.vb | 3 +- VB/ViewModel/PanelViewModel.vb | 7 +- VB/WpfApplication.Net5.sln | 2 +- VB/WpfApplication.Net5.vbproj | 5 ++ VB/WpfApplication.sln | 2 +- VB/WpfApplication.vbproj | 108 ++++++++++++++++++++++------ 19 files changed, 144 insertions(+), 115 deletions(-) diff --git a/VB/Application.xaml b/VB/Application.xaml index 4b13188..71e0f86 100644 --- a/VB/Application.xaml +++ b/VB/Application.xaml @@ -1,4 +1,4 @@ - Partial Public Class App Inherits Application + End Class End Namespace diff --git a/VB/Helpers/GlyphHelper.vb b/VB/Helpers/GlyphHelper.vb index 29ce50e..2bea6d7 100644 --- a/VB/Helpers/GlyphHelper.vb +++ b/VB/Helpers/GlyphHelper.vb @@ -1,15 +1,12 @@ -Imports Microsoft.VisualBasic -Imports System +Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Windows.Media.Imaging Namespace WpfApplication - Friend NotInheritable Class GlyphHelper - Private Sub New() - End Sub - Public Shared Function GetGlyph(ByVal path As String) As BitmapImage + Friend Module GlyphHelper + Public Function GetGlyph(ByVal path As String) As BitmapImage Return New BitmapImage(DevExpress.Utils.AssemblyHelper.GetResourceUri(GetType(GlyphHelper).Assembly, path)) End Function - End Class + End Module End Namespace diff --git a/VB/MainWindow.xaml b/VB/MainWindow.xaml index 6f802d5..cc3ebb6 100644 --- a/VB/MainWindow.xaml +++ b/VB/MainWindow.xaml @@ -1,4 +1,4 @@ - Partial Public Class MainWindow Inherits Window + Public Sub New() InitializeComponent() End Sub diff --git a/VB/My Project/AssemblyInfo.vb b/VB/My Project/AssemblyInfo.vb index 6459250..6066ec4 100644 --- a/VB/My Project/AssemblyInfo.vb +++ b/VB/My Project/AssemblyInfo.vb @@ -1,5 +1,4 @@ -Imports Microsoft.VisualBasic -Imports System.Reflection +Imports System.Reflection Imports System.Resources Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices @@ -32,10 +31,6 @@ Imports System.Windows '[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) diff --git a/VB/My Project/Resources.Designer.vb b/VB/My Project/Resources.Designer.vb index 37d31bb..6f7246f 100644 --- a/VB/My Project/Resources.Designer.vb +++ b/VB/My Project/Resources.Designer.vb @@ -8,10 +8,7 @@ ' '------------------------------------------------------------------------------ - -Imports Microsoft.VisualBasic -Imports System -Namespace My +Namespace My.Resources ''' @@ -21,25 +18,28 @@ Namespace My ' class via a tool like ResGen or Visual Studio. ' To add or remove a member, edit your .ResX file then rerun ResGen ' with the /str option, or rebuild your VS project. - _ - Friend Class Resources + + + + Friend Module Resources - Private Shared resourceMan As Global.System.Resources.ResourceManager + Private resourceMan As System.Resources.ResourceManager - Private Shared resourceCulture As Global.System.Globalization.CultureInfo + Private resourceCulture As System.Globalization.CultureInfo - _ - Friend Sub New() - End Sub +' internal Resources() +' { +' } ''' ''' Returns the cached ResourceManager instance used by this class. ''' - _ - Friend Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + + Friend ReadOnly Property ResourceManager() As System.Resources.ResourceManager Get If (resourceMan Is Nothing) Then - Dim temp As New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) + Dim temp As New System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan @@ -50,8 +50,8 @@ Namespace My ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. ''' - _ - Friend Shared Property Culture() As Global.System.Globalization.CultureInfo + + Friend Property Culture() As System.Globalization.CultureInfo Get Return resourceCulture End Get @@ -59,5 +59,5 @@ Namespace My resourceCulture = value End Set End Property - End Class + End Module End Namespace diff --git a/VB/My Project/Settings.Designer.vb b/VB/My Project/Settings.Designer.vb index ca564c9..db1ef6f 100644 --- a/VB/My Project/Settings.Designer.vb +++ b/VB/My Project/Settings.Designer.vb @@ -8,17 +8,15 @@ ' '------------------------------------------------------------------------------ - -Imports Microsoft.VisualBasic -Imports System Namespace My - _ + + Friend NotInheritable Partial Class Settings Inherits System.Configuration.ApplicationSettingsBase - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) + Private Shared defaultInstance As Settings = (CType(System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) Public Shared ReadOnly Property [Default]() As Settings Get diff --git a/VB/View/DocumentView.xaml b/VB/View/DocumentView.xaml index 3334596..37e9351 100644 --- a/VB/View/DocumentView.xaml +++ b/VB/View/DocumentView.xaml @@ -1,4 +1,4 @@ - Partial Public Class DocumentView Inherits UserControl + Public Sub New() InitializeComponent() End Sub diff --git a/VB/View/PanelView.xaml b/VB/View/PanelView.xaml index 9ef3cb0..c78ed14 100644 --- a/VB/View/PanelView.xaml +++ b/VB/View/PanelView.xaml @@ -1,4 +1,4 @@ - Partial Public Class PanelView Inherits UserControl + Public Sub New() InitializeComponent() End Sub diff --git a/VB/ViewModel/DocumentViewModel.vb b/VB/ViewModel/DocumentViewModel.vb index c7b6716..4170254 100644 --- a/VB/ViewModel/DocumentViewModel.vb +++ b/VB/ViewModel/DocumentViewModel.vb @@ -1,63 +1,37 @@ -Imports Microsoft.VisualBasic -Imports System +Imports System Imports System.Collections.Generic Imports System.Linq Imports DevExpress.Xpf.Docking Namespace WpfApplication Public Class DocumentViewModel - Implements IMVVMDockingProperties + Inherits IMVVMDockingProperties Public Sub New(ByVal caption As String, ByVal imagePath As String) - Caption = caption + Me.Caption = caption Glyph = GlyphHelper.GetGlyph(imagePath) Text = String.Format("Document text ({0})", caption) End Sub - Private Property TargetName() As String Implements IMVVMDockingProperties.TargetName - Get - Return "DocumentsGroup" - End Get - Set(ByVal value As String) - Throw New NotImplementedException() - End Set - - End Property - - - - - Private privateCaption As String - Public Property Caption() As String + Private Property IMVVMDockingProperties_TargetName() As String Implements IMVVMDockingProperties.TargetName Get - Return privateCaption + Return "DocumentsGroup" End Get Set(ByVal value As String) - privateCaption = value + Throw New NotImplementedException() End Set + End Property - Private privateGlyph As Object + + Public Property Caption() As String + + Public Property Glyph() As Object - Get - Return privateGlyph - End Get - Set(ByVal value As Object) - privateGlyph = value - End Set - End Property - Private privateText As String Public Property Text() As String - Get - Return privateText - End Get - Set(ByVal value As String) - privateText = value - End Set - End Property End Class diff --git a/VB/ViewModel/MainViewModel.vb b/VB/ViewModel/MainViewModel.vb index 92f52ec..3835049 100644 --- a/VB/ViewModel/MainViewModel.vb +++ b/VB/ViewModel/MainViewModel.vb @@ -1,5 +1,4 @@ -Imports Microsoft.VisualBasic -Imports System +Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Collections.ObjectModel diff --git a/VB/ViewModel/PanelViewModel.vb b/VB/ViewModel/PanelViewModel.vb index 3343321..c84507c 100644 --- a/VB/ViewModel/PanelViewModel.vb +++ b/VB/ViewModel/PanelViewModel.vb @@ -1,5 +1,4 @@ -Imports Microsoft.VisualBasic -Imports System +Imports System Imports System.Collections.Generic Imports System.Linq Imports DevExpress.Xpf.Docking @@ -7,13 +6,13 @@ Imports System.Windows.Media Namespace WpfApplication Public Class PanelViewModel - Implements IMVVMDockingProperties + Inherits IMVVMDockingProperties Public Sub New(ByVal c As Color) _Color = New SolidColorBrush(c) End Sub - Private Property TargetName() As String Implements IMVVMDockingProperties.TargetName + Private Property IMVVMDockingProperties_TargetName() As String Implements IMVVMDockingProperties.TargetName Get Return "DockPanels" End Get diff --git a/VB/WpfApplication.Net5.sln b/VB/WpfApplication.Net5.sln index 41e8bbf..bcc6b12 100644 --- a/VB/WpfApplication.Net5.sln +++ b/VB/WpfApplication.Net5.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 16 VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication.Net5.vbproj b/VB/WpfApplication.Net5.vbproj index 85f7d52..22308ab 100644 --- a/VB/WpfApplication.Net5.vbproj +++ b/VB/WpfApplication.Net5.vbproj @@ -1,3 +1,4 @@ + net5.0-windows @@ -12,6 +13,10 @@ x86;AnyCPU false obj*/** + On + Binary + Off + On diff --git a/VB/WpfApplication.sln b/VB/WpfApplication.sln index 5359cee..6d4e706 100644 --- a/VB/WpfApplication.sln +++ b/VB/WpfApplication.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication.vbproj b/VB/WpfApplication.vbproj index 4ef2b2d..3fcef62 100644 --- a/VB/WpfApplication.vbproj +++ b/VB/WpfApplication.vbproj @@ -11,13 +11,13 @@ WpfApplication v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + obj.NetFX On Binary Off On - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - obj.NetFX x86 @@ -28,6 +28,7 @@ true true prompt + true x86 @@ -37,21 +38,80 @@ false true prompt + true - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + True + C:\DXDlls\21.1.5\DevExpress.Data.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Mvvm.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Pdf.v21.1.Core.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Office.v21.1.Core.dll + + + True + C:\DXDlls\21.1.5\DevExpress.RichEdit.v21.1.Core.dll + + + True + C:\DXDlls\21.1.5\DevExpress.RichEdit.v21.1.Export.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Printing.v21.1.Core.dll + + + True + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.CodeView.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Data.Desktop.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Core.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Docking.v21.1.dll + + + True + C:\DXDlls\21.1.5\DevExpress.Xpf.Layout.v21.1.Core.dll + @@ -119,12 +179,14 @@ True - ResXFileCodeGenerator + VbMyResourcesResXFileCodeGenerator Resources.Designer.vb + My.Resources SettingsSingleFileGenerator Settings.Designer.vb + My @@ -134,12 +196,12 @@ - From 310347a93720b6d5175017df4c69a80666058808 Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Mon, 6 Sep 2021 17:18:54 +0300 Subject: [PATCH 2/3] README auto update [skip ci] --- Readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Readme.md b/Readme.md index a14ea49..db4243e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,4 @@ -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128643029/11.2.8%2B) [![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E20026) [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) From 63794d01771bbd314373f49d7167b941667308bc Mon Sep 17 00:00:00 2001 From: DevExpressExampleBot Date: Mon, 4 Oct 2021 10:14:09 +0300 Subject: [PATCH 3/3] autogenerate VB --- VB/App.xaml | 20 ++++ VB/App.xaml.vb | 12 +++ VB/Helpers/GlyphHelper.vb | 15 ++- VB/MainWindow.xaml | 2 +- VB/MainWindow.xaml.vb | 33 +++---- VB/Properties/AssemblyInfo.vb | 44 +++++++++ VB/Properties/Resources.Designer.vb | 62 +++++++++++++ VB/Properties/Resources.resx | 117 ++++++++++++++++++++++++ VB/Properties/Settings.Designer.vb | 25 +++++ VB/Properties/Settings.settings | 7 ++ VB/View/DocumentView.xaml | 2 +- VB/View/DocumentView.xaml.vb | 31 ++----- VB/View/PanelView.xaml | 2 +- VB/View/PanelView.xaml.vb | 31 ++----- VB/ViewModel/DocumentViewModel.vb | 47 ++++------ VB/ViewModel/MainViewModel.vb | 56 +++++------- VB/ViewModel/PanelViewModel.vb | 64 ++++++------- VB/WpfApplication.Net5.sln | 2 +- VB/WpfApplication.Net5.vbproj | 13 ++- VB/WpfApplication.sln | 2 +- VB/WpfApplication.vbproj | 136 ++++++++-------------------- 21 files changed, 449 insertions(+), 274 deletions(-) create mode 100644 VB/App.xaml create mode 100644 VB/App.xaml.vb create mode 100644 VB/Properties/AssemblyInfo.vb create mode 100644 VB/Properties/Resources.Designer.vb create mode 100644 VB/Properties/Resources.resx create mode 100644 VB/Properties/Settings.Designer.vb create mode 100644 VB/Properties/Settings.settings diff --git a/VB/App.xaml b/VB/App.xaml new file mode 100644 index 0000000..4b13188 --- /dev/null +++ b/VB/App.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/VB/App.xaml.vb b/VB/App.xaml.vb new file mode 100644 index 0000000..a5c27b4 --- /dev/null +++ b/VB/App.xaml.vb @@ -0,0 +1,12 @@ +Imports System.Windows + +Namespace WpfApplication + + ''' + ''' Interaction logic for App.xaml + ''' + Public Partial Class App + Inherits Application + + End Class +End Namespace diff --git a/VB/Helpers/GlyphHelper.vb b/VB/Helpers/GlyphHelper.vb index 2bea6d7..635a223 100644 --- a/VB/Helpers/GlyphHelper.vb +++ b/VB/Helpers/GlyphHelper.vb @@ -1,12 +1,11 @@ -Imports System -Imports System.Collections.Generic -Imports System.Linq Imports System.Windows.Media.Imaging Namespace WpfApplication - Friend Module GlyphHelper - Public Function GetGlyph(ByVal path As String) As BitmapImage - Return New BitmapImage(DevExpress.Utils.AssemblyHelper.GetResourceUri(GetType(GlyphHelper).Assembly, path)) - End Function - End Module + + Friend Module GlyphHelper + + Public Function GetGlyph(ByVal path As String) As BitmapImage + Return New BitmapImage(DevExpress.Utils.AssemblyHelper.GetResourceUri(GetType(GlyphHelper).Assembly, path)) + End Function + End Module End Namespace diff --git a/VB/MainWindow.xaml b/VB/MainWindow.xaml index cc3ebb6..6f802d5 100644 --- a/VB/MainWindow.xaml +++ b/VB/MainWindow.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for MainWindow.xaml - ''' - Partial Public Class MainWindow - Inherits Window - Public Sub New() - InitializeComponent() - End Sub - End Class -End Namespace \ No newline at end of file + ''' + ''' Interaction logic for MainWindow.xaml + ''' + Public Partial Class MainWindow + Inherits Window + + Public Sub New() + InitializeComponent() + End Sub + End Class +End Namespace diff --git a/VB/Properties/AssemblyInfo.vb b/VB/Properties/AssemblyInfo.vb new file mode 100644 index 0000000..e349cd5 --- /dev/null +++ b/VB/Properties/AssemblyInfo.vb @@ -0,0 +1,44 @@ +Imports System.Reflection +Imports System.Runtime.InteropServices +Imports System.Windows + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + + + + + + + + +' Setting ComVisible to false makes the types in this assembly not visible +' to COM components. If you need to access a type in this assembly from +' COM, set the ComVisible attribute to true on that type. + +'In order to begin building localizable applications, set +'CultureYouAreCodingWith in your .csproj file +'inside a . For example, if you are using US english +'in your source files, set the to en-US. Then uncomment +'the NeutralResourceLanguage attribute below. Update the "en-US" in +'the line below to match the UICulture setting in the project file. +'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] +'(used if a resource is not found in the page, +' or application resource dictionaries) +'(used if a resource is not found in the page, +' app, or any theme specific resource dictionaries) + 'where theme specific resource dictionaries are located +'where the generic resource dictionary is located +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' [assembly: AssemblyVersion("1.0.*")] + + diff --git a/VB/Properties/Resources.Designer.vb b/VB/Properties/Resources.Designer.vb new file mode 100644 index 0000000..0859038 --- /dev/null +++ b/VB/Properties/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.235 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ +Namespace WpfApplication.Properties + + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + ' This class was auto-generated by the StronglyTypedResourceBuilder + ' class via a tool like ResGen or Visual Studio. + ' To add or remove a member, edit your .ResX file then rerun ResGen + ' with the /str option, or rebuild your VS project. + + + + Friend Class Resources + + Private Shared resourceMan As Global.System.Resources.ResourceManager + + Private Shared resourceCulture As Global.System.Globalization.CultureInfo + + + Friend Sub New() + End Sub + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + + Friend Shared ReadOnly Property ResourceManager As Global.System.Resources.ResourceManager + Get + If(WpfApplication.Properties.Resources.resourceMan Is Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Resources", GetType(WpfApplication.Properties.Resources).Assembly) + WpfApplication.Properties.Resources.resourceMan = temp + End If + + Return WpfApplication.Properties.Resources.resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + + Friend Shared Property Culture As Global.System.Globalization.CultureInfo + Get + Return WpfApplication.Properties.Resources.resourceCulture + End Get + + Set(ByVal value As Global.System.Globalization.CultureInfo) + WpfApplication.Properties.Resources.resourceCulture = value + End Set + End Property + End Class +End Namespace diff --git a/VB/Properties/Resources.resx b/VB/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/VB/Properties/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/VB/Properties/Settings.Designer.vb b/VB/Properties/Settings.Designer.vb new file mode 100644 index 0000000..64ee058 --- /dev/null +++ b/VB/Properties/Settings.Designer.vb @@ -0,0 +1,25 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.235 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ +Namespace WpfApplication.Properties + + + + Friend NotInheritable Partial Class Settings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As WpfApplication.Properties.Settings = CType((Global.System.Configuration.ApplicationSettingsBase.Synchronized(New WpfApplication.Properties.Settings())), WpfApplication.Properties.Settings) + + Public Shared ReadOnly Property [Default] As Settings + Get + Return WpfApplication.Properties.Settings.defaultInstance + End Get + End Property + End Class +End Namespace diff --git a/VB/Properties/Settings.settings b/VB/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/VB/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/VB/View/DocumentView.xaml b/VB/View/DocumentView.xaml index 37e9351..3334596 100644 --- a/VB/View/DocumentView.xaml +++ b/VB/View/DocumentView.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for DocumentView.xaml - ''' - Partial Public Class DocumentView - Inherits UserControl - Public Sub New() - InitializeComponent() - End Sub - End Class + ''' + ''' Interaction logic for DocumentView.xaml + ''' + Public Partial Class DocumentView + Inherits UserControl + + Public Sub New() + InitializeComponent() + End Sub + End Class End Namespace diff --git a/VB/View/PanelView.xaml b/VB/View/PanelView.xaml index c78ed14..9ef3cb0 100644 --- a/VB/View/PanelView.xaml +++ b/VB/View/PanelView.xaml @@ -1,4 +1,4 @@ - - ''' Interaction logic for PanelView.xaml - ''' - Partial Public Class PanelView - Inherits UserControl - Public Sub New() - InitializeComponent() - End Sub - End Class + ''' + ''' Interaction logic for PanelView.xaml + ''' + Public Partial Class PanelView + Inherits UserControl + + Public Sub New() + InitializeComponent() + End Sub + End Class End Namespace diff --git a/VB/ViewModel/DocumentViewModel.vb b/VB/ViewModel/DocumentViewModel.vb index 4170254..ab000a5 100644 --- a/VB/ViewModel/DocumentViewModel.vb +++ b/VB/ViewModel/DocumentViewModel.vb @@ -1,38 +1,31 @@ -Imports System -Imports System.Collections.Generic -Imports System.Linq +Imports System Imports DevExpress.Xpf.Docking Namespace WpfApplication - Public Class DocumentViewModel - Inherits IMVVMDockingProperties + Public Class DocumentViewModel + Inherits IMVVMDockingProperties - Public Sub New(ByVal caption As String, ByVal imagePath As String) - Me.Caption = caption - Glyph = GlyphHelper.GetGlyph(imagePath) - Text = String.Format("Document text ({0})", caption) - End Sub + Public Sub New(ByVal caption As String, ByVal imagePath As String) + Me.Caption = caption + Glyph = GetGlyph(imagePath) + Text = String.Format("Document text ({0})", caption) + End Sub - Private Property IMVVMDockingProperties_TargetName() As String Implements IMVVMDockingProperties.TargetName - Get - Return "DocumentsGroup" - End Get - Set(ByVal value As String) - Throw New NotImplementedException() - End Set + Private Property TargetName As String + Get + Return "DocumentsGroup" + End Get - End Property + Set(ByVal value As String) + Throw New NotImplementedException() + End Set + End Property + Public Property Caption As String + Public Property Glyph As Object - Public Property Caption() As String - - - Public Property Glyph() As Object - - Public Property Text() As String - - - End Class + Public Property Text As String + End Class End Namespace diff --git a/VB/ViewModel/MainViewModel.vb b/VB/ViewModel/MainViewModel.vb index 3835049..9d38c41 100644 --- a/VB/ViewModel/MainViewModel.vb +++ b/VB/ViewModel/MainViewModel.vb @@ -1,38 +1,30 @@ -Imports System -Imports System.Collections.Generic -Imports System.Linq Imports System.Collections.ObjectModel Imports DevExpress.Xpf.Docking Imports System.Windows.Media Namespace WpfApplication - Public Class MainViewModel - Public Sub New() - ChildViews.Add(New DocumentViewModel("Document1", "/Images/change.png")) - ChildViews.Add(New DocumentViewModel("Document2", "/Images/create.png")) - ChildViews.Add(New DocumentViewModel("Document2", "/Images/new-16x16.png")) - ChildViews.Add(New PanelViewModel(Colors.Red)) - ChildViews.Add(New PanelViewModel(Colors.Blue)) - ChildViews.Add(New PanelViewModel(Colors.Green)) - End Sub - - Private _Children As New ObservableCollection(Of Object)() - - - Public Property ChildViews() As ObservableCollection(Of Object) - Get - Return _Children - End Get - Set(ByVal value As ObservableCollection(Of Object)) - _Children = value - - End Set - End Property - - - - - - End Class -End Namespace \ No newline at end of file + Public Class MainViewModel + + Public Sub New() + ChildViews.Add(New DocumentViewModel("Document1", "/Images/change.png")) + ChildViews.Add(New DocumentViewModel("Document2", "/Images/create.png")) + ChildViews.Add(New DocumentViewModel("Document2", "/Images/new-16x16.png")) + ChildViews.Add(New PanelViewModel(Colors.Red)) + ChildViews.Add(New PanelViewModel(Colors.Blue)) + ChildViews.Add(New PanelViewModel(Colors.Green)) + End Sub + + Private _Children As ObservableCollection(Of Object) = New ObservableCollection(Of Object)() + + Public Property ChildViews As ObservableCollection(Of Object) + Get + Return _Children + End Get + + Set(ByVal value As ObservableCollection(Of Object)) + _Children = value + End Set + End Property + End Class +End Namespace diff --git a/VB/ViewModel/PanelViewModel.vb b/VB/ViewModel/PanelViewModel.vb index c84507c..28a993d 100644 --- a/VB/ViewModel/PanelViewModel.vb +++ b/VB/ViewModel/PanelViewModel.vb @@ -1,37 +1,37 @@ -Imports System -Imports System.Collections.Generic -Imports System.Linq +Imports System Imports DevExpress.Xpf.Docking Imports System.Windows.Media Namespace WpfApplication - Public Class PanelViewModel - Inherits IMVVMDockingProperties - - Public Sub New(ByVal c As Color) - _Color = New SolidColorBrush(c) - End Sub - - Private Property IMVVMDockingProperties_TargetName() As String Implements IMVVMDockingProperties.TargetName - Get - Return "DockPanels" - End Get - Set(ByVal value As String) - Throw New NotImplementedException() - End Set - End Property - - ' Fields... - Private _Color As SolidColorBrush - - - Public Property ColorBrush() As SolidColorBrush - Get - Return _Color - End Get - Set(ByVal value As SolidColorBrush) - _Color = value - End Set - End Property - End Class + + Public Class PanelViewModel + Inherits IMVVMDockingProperties + + Public Sub New(ByVal c As Color) + _Color = New SolidColorBrush(c) + End Sub + + Private Property TargetName As String + Get + Return "DockPanels" + End Get + + Set(ByVal value As String) + Throw New NotImplementedException() + End Set + End Property + + ' Fields... + Private _Color As SolidColorBrush + + Public Property ColorBrush As SolidColorBrush + Get + Return _Color + End Get + + Set(ByVal value As SolidColorBrush) + _Color = value + End Set + End Property + End Class End Namespace diff --git a/VB/WpfApplication.Net5.sln b/VB/WpfApplication.Net5.sln index bcc6b12..41e8bbf 100644 --- a/VB/WpfApplication.Net5.sln +++ b/VB/WpfApplication.Net5.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 16 VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication.Net5.vbproj b/VB/WpfApplication.Net5.vbproj index 22308ab..d9b8604 100644 --- a/VB/WpfApplication.Net5.vbproj +++ b/VB/WpfApplication.Net5.vbproj @@ -1,6 +1,6 @@ - + On net5.0-windows x86 WinExe @@ -12,14 +12,13 @@ true x86;AnyCPU false - obj*/** - On - Binary - Off - On + false - + + + + diff --git a/VB/WpfApplication.sln b/VB/WpfApplication.sln index 6d4e706..5359cee 100644 --- a/VB/WpfApplication.sln +++ b/VB/WpfApplication.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 diff --git a/VB/WpfApplication.vbproj b/VB/WpfApplication.vbproj index 3fcef62..7162557 100644 --- a/VB/WpfApplication.vbproj +++ b/VB/WpfApplication.vbproj @@ -1,23 +1,22 @@  + On Debug x86 8.0.30703 2.0 {A4207FA7-043D-4A66-9577-8C47D19B21C8} WinExe + Properties WpfApplication v4.5.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + 4 obj.NetFX - On - Binary - Off - On x86 @@ -25,93 +24,33 @@ full false bin\Debug\ - true - true + DEBUG,TRACE prompt - true + 4 x86 pdbonly true bin\Release\ - false - true + TRACE prompt - true + 4 - - - - - - - - - - - - - - - - - - - - - - True - C:\DXDlls\21.1.5\DevExpress.Data.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Mvvm.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Pdf.v21.1.Core.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Office.v21.1.Core.dll - - - True - C:\DXDlls\21.1.5\DevExpress.RichEdit.v21.1.Core.dll - - - True - C:\DXDlls\21.1.5\DevExpress.RichEdit.v21.1.Export.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Printing.v21.1.Core.dll - - - True - - - True - C:\DXDlls\21.1.5\DevExpress.Xpf.CodeView.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Data.Desktop.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Xpf.Core.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Xpf.Docking.v21.1.dll - - - True - C:\DXDlls\21.1.5\DevExpress.Xpf.Layout.v21.1.Core.dll - + + + + + + + + + + + + + @@ -129,7 +68,7 @@ - + MSBuild:Compile Designer @@ -140,8 +79,8 @@ MSBuild:Compile Designer - - Application.xaml + + App.xaml Code @@ -165,30 +104,29 @@ - + Code - + True True Resources.resx - + True Settings.settings True - - VbMyResourcesResXFileCodeGenerator + + ResXFileCodeGenerator Resources.Designer.vb - My.Resources + WpfApplication.Properties - + SettingsSingleFileGenerator Settings.Designer.vb - My - + @@ -196,12 +134,12 @@ -