Browse Source

Fix 'My.Application' in VB WPF project template.

pull/28/head
Daniel Grunwald 13 years ago
parent
commit
498f77ad07
  1. 6
      data/templates/project/VB/MyWpfExtension.vb
  2. 22
      data/templates/project/VB/WPFApplication.xpt
  3. 10
      data/templates/project/VB/WPFNavigationApplication.xpt

6
data/templates/project/VB/MyWpfExtension.vb

@ -10,9 +10,9 @@ Namespace My
''' <summary> ''' <summary>
''' Returns the application object for the running application ''' Returns the application object for the running application
''' </summary> ''' </summary>
Friend ReadOnly Property Application() As MyApplication Friend ReadOnly Property Application() As Application
Get Get
Return CType(Global.System.Windows.Application.Current, MyApplication) Return CType(Global.System.Windows.Application.Current, Application)
End Get End Get
End Property End Property
@ -108,7 +108,7 @@ Partial Class MyLog
Inherits Global.Microsoft.VisualBasic.Logging.Log Inherits Global.Microsoft.VisualBasic.Logging.Log
End Class End Class
Partial Class MyApplication Partial Class Application
Inherits Global.System.Windows.Application Inherits Global.System.Windows.Application
Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo

22
data/templates/project/VB/WPFApplication.xpt

@ -13,7 +13,7 @@
<!-- Actions --> <!-- Actions -->
<Actions> <Actions>
<Open filename = "Window1.xaml"/> <Open filename = "MainWindow.xaml"/>
</Actions> </Actions>
<Project language = "VBNet" defaultPlatform="x86"> <Project language = "VBNet" defaultPlatform="x86">
@ -39,15 +39,15 @@
</PropertyGroup> </PropertyGroup>
<Files> <Files>
<File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="App" <File name="Application.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
</Application.Resources> </Application.Resources>
</Application>]]></File> </Application>]]></File>
<File name="App.xaml.vb" SubType="Code" DependentUpon="App.xaml"><![CDATA[${StandardHeader.VBNET} <File name="Application.xaml.vb" SubType="Code" DependentUpon="App.xaml"><![CDATA[${StandardHeader.VBNET}
Imports System Imports System
Imports System.Windows Imports System.Windows
Imports System.Data Imports System.Data
@ -55,13 +55,13 @@ Imports System.Xml
Imports System.Configuration Imports System.Configuration
''' <summary> ''' <summary>
''' Interaction logic for App.xaml ''' Interaction logic for Application.xaml
''' </summary> ''' </summary>
Public Partial Class App Public Partial Class Application
Inherits Application Inherits System.Windows.Application
End Class]]></File> End Class]]></File>
<File name="Window1.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="Window1" <File name="MainWindow.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${StandardNamespace}" Height="300" Width="300" Title="${StandardNamespace}" Height="300" Width="300"
@ -70,7 +70,7 @@ End Class]]></File>
</Grid> </Grid>
</Window>]]></File> </Window>]]></File>
<File name="Window1.xaml.vb" SubType="Code" DependentUpon="Window1.xaml"><![CDATA[${StandardHeader.VBNET} <File name="MainWindow.xaml.vb" SubType="Code" DependentUpon="MainWindow.xaml"><![CDATA[${StandardHeader.VBNET}
Imports System Imports System
Imports System.Collections.Generic Imports System.Collections.Generic
Imports System.Text Imports System.Text
@ -82,9 +82,9 @@ Imports System.Windows.Input
Imports System.Windows.Media Imports System.Windows.Media
''' <summary> ''' <summary>
''' Interaction logic for Window1.xaml ''' Interaction logic for MainWindow.xaml
''' </summary> ''' </summary>
Public Partial Class Window1 Public Partial Class MainWindow
Inherits Window Inherits Window
Public Sub New() Public Sub New()

10
data/templates/project/VB/WPFNavigationApplication.xpt

@ -39,7 +39,7 @@
</PropertyGroup> </PropertyGroup>
<Files> <Files>
<File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="App" <File name="Application.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Page1.xaml" StartupUri="Page1.xaml"
@ -48,7 +48,7 @@
</Application.Resources> </Application.Resources>
</Application>]]></File> </Application>]]></File>
<File name="App.xaml.vb" SubType="Code" DependentUpon="App.xaml"><![CDATA[${StandardHeader.VBNET} <File name="Application.xaml.vb" SubType="Code" DependentUpon="App.xaml"><![CDATA[${StandardHeader.VBNET}
Imports System Imports System
Imports System.Windows Imports System.Windows
Imports System.Data Imports System.Data
@ -56,10 +56,10 @@ Imports System.Xml
Imports System.Configuration Imports System.Configuration
''' <summary> ''' <summary>
''' Interaction logic for App.xaml ''' Interaction logic for Application.xaml
''' </summary> ''' </summary>
Public Partial Class App Public Partial Class Application
Inherits Application Inherits System.Windows.Application
End Class]]></File> End Class]]></File>
<File name="Page1.xaml" language="XML" buildAction="Page"><![CDATA[<Page x:Class="Page1" <File name="Page1.xaml" language="XML" buildAction="Page"><![CDATA[<Page x:Class="Page1"

Loading…
Cancel
Save