Permalink
Browse files

fixed namespace problems in VB WPF templates

  • Loading branch information...
1 parent 27f1e11 commit 0365a3f26c4f95c3b0ae8a7ca6b7637ec2ca72ab @siegfriedpammer siegfriedpammer committed Oct 27, 2010
@@ -33,7 +33,7 @@
${Path} -> Full path of the file
-->
<Files>
- <File name="${FullName}" language="XML" buildAction="Page"><![CDATA[<Page x:Class="${StandardNamespace}.${ClassName}"
+ <File name="${FullName}" language="XML" buildAction="Page"><![CDATA[<Page x:Class="${ClassName}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${FileNameWithoutExtension}">
@@ -52,16 +52,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for ${FileName}
- ''' </summary>
- Public Partial Class ${ClassName} Inherits Page
- Public Sub New()
- InitializeComponent()
- End Sub
- End Class
-End Namespace]]></File>
+''' <summary>
+''' Interaction logic for ${FileName}
+''' </summary>
+Public Partial Class ${ClassName}
+ Inherits Page
+
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+End Class]]></File>
</Files>
<AdditionalOptions/>
@@ -37,7 +37,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
- x:Class="${StandardNamespace}.${FileNameWithoutExtension}"
+ x:Class="${FileNameWithoutExtension}"
x:TypeArguments="sys:String"
Title="${FileNameWithoutExtension}">
<Grid>
@@ -57,40 +57,37 @@ Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for ${FileName}
- ''' </summary>
+''' <summary>
+''' Interaction logic for ${FileName}
+''' </summary>
- Public Partial Class ${FileNameWithoutExtension}
- Inherits PageFunction(Of String)
+Public Partial Class ${FileNameWithoutExtension}
+ Inherits PageFunction(Of String)
- Public Sub New()
- InitializeComponent()
- End Sub
+ Public Sub New()
+ InitializeComponent()
+ End Sub
- ' The OnLoaded handler can be run automatically when the class is loaded. To use it, add Loaded="OnLoaded" to the attributes of the root element of the .xaml file and uncomment the following line.
- ' Private Sub OnLoaded(sender As Object, e As RoutedEventArgs)
- ' End Sub
- '
- ' Sample Finish Handler
- ' Private Sub OnClickDone(sender As Object, e As RoutedEventArgs)
- ' OnFinish(New ReturnEventArgs(Of String)("The return value"))
- ' End Sub
+ ' The OnLoaded handler can be run automatically when the class is loaded. To use it, add Loaded="OnLoaded" to the attributes of the root element of the .xaml file and uncomment the following line.
+ ' Private Sub OnLoaded(sender As Object, e As RoutedEventArgs)
+ ' End Sub
+ '
+ ' Sample Finish Handler
+ ' Private Sub OnClickDone(sender As Object, e As RoutedEventArgs)
+ ' OnFinish(New ReturnEventArgs(Of String)("The return value"))
+ ' End Sub
- ' To launch this page function, put this code in the launching page.
- ' Dim pageFunction As New ${FileNameWithoutExtension}()
- ' pageFunction.[Return] += New ReturnEventHandler(Of String)(OnFileNameWithoutExtensionReturned)
- ' _NavWin.Navigate(pageFunction)
- '
- ' This handler goes in the launching page.
- ' Public Sub On${FileNameWithoutExtension}Returned(sender As Object, e As ReturnEventArgs(Of String))
- ' Console.WriteLine("${FileNameWithoutExtension} returned: " & e.Result)
- ' End Sub
-
-
- End Class
-End Namespace]]></File>
+ ' To launch this page function, put this code in the launching page.
+ ' Dim pageFunction As New ${FileNameWithoutExtension}()
+ ' pageFunction.[Return] += New ReturnEventHandler(Of String)(OnFileNameWithoutExtensionReturned)
+ ' _NavWin.Navigate(pageFunction)
+ '
+ ' This handler goes in the launching page.
+ ' Public Sub On${FileNameWithoutExtension}Returned(sender As Object, e As ReturnEventArgs(Of String))
+ ' Console.WriteLine("${FileNameWithoutExtension} returned: " & e.Result)
+ ' End Sub
+
+End Class]]></File>
</Files>
<AdditionalOptions/>
@@ -33,14 +33,14 @@
${Path} -> Full path of the file
-->
<Files>
- <File name="${FullName}" language="C#"><![CDATA[<UserControl x:Class="${StandardNamespace}.${ClassName}"
+ <File name="${FullName}" language="XML"><![CDATA[<UserControl x:Class="${ClassName}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
</Grid>
</UserControl>]]></File>
- <File name="${FullName}.cs" language="VBNET" DependentUpon="${FileName}" SubType="Code"><![CDATA[${StandardHeader.VBNET}
+ <File name="${FullName}.vb" language="VBNET" DependentUpon="${FileName}" SubType="Code"><![CDATA[${StandardHeader.VBNET}
Imports System
Imports System.Collections.Generic
Imports System.Text
@@ -51,16 +51,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for ${FileName}
- ''' </summary>
- Public Partial Class ${ClassName} Inherits UserControl
- Public Sub New()
- InitializeComponent()
- End Sub
- End Class
-End Namespace]]></File>
+''' <summary>
+''' Interaction logic for ${FileName}
+''' </summary>
+Public Partial Class ${ClassName}
+ Inherits UserControl
+
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+End Class]]></File>
</Files>
<AdditionalOptions/>
@@ -33,7 +33,7 @@
${Path} -> Full path of the file
-->
<Files>
- <File name="${FullName}" language="XML" buildAction="Page"><![CDATA[<Window x:Class="${StandardNamespace}.${ClassName}"
+ <File name="${FullName}" language="XML" buildAction="Page"><![CDATA[<Window x:Class="${ClassName}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${StandardNamespace}" Height="300" Width="300">
@@ -52,16 +52,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
-Namespace ${StandardNamespace}
- ' <summary>
- ' Interaction logic for ${FileName}
- ' </summary>
- Public Partial Class ${ClassName} Inherits Window
- Public Sub New()
- InitializeComponent()
- End Sub
- End Class
-End Namespace]]></File>
+''' <summary>
+''' Interaction logic for ${FileName}
+''' </summary>
+Public Partial Class ${ClassName}
+ Inherits Window
+
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+End Class]]></File>
</Files>
<AdditionalOptions/>
@@ -39,7 +39,7 @@
</PropertyGroup>
<Files>
- <File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="${StandardNamespace}.App"
+ <File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml">
@@ -54,16 +54,14 @@ Imports System.Data
Imports System.Xml
Imports System.Configuration
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for App.xaml
- ''' </summary>
- Public Partial Class App
- Inherits Application
-
- End Class
-End Namespace]]></File>
- <File name="Window1.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="${StandardNamespace}.Window1"
+''' <summary>
+''' Interaction logic for App.xaml
+''' </summary>
+Public Partial Class App
+ Inherits Application
+
+End Class]]></File>
+ <File name="Window1.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="${StandardNamespace}" Height="300" Width="300"
@@ -83,18 +81,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for Window1.xaml
- ''' </summary>
- Public Partial Class Window1
- Inherits Window
+''' <summary>
+''' Interaction logic for Window1.xaml
+''' </summary>
+Public Partial Class Window1
+ Inherits Window
- Public Sub New()
- InitializeComponent()
- End Sub
- End Class
-End Namespace]]></File>
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+End Class]]></File>
<File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" />
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" />
<File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" />
@@ -39,7 +39,7 @@
</PropertyGroup>
<Files>
- <File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="${StandardNamespace}.App"
+ <File name="App.xaml" buildAction="ApplicationDefinition" language="XML"><![CDATA[<Application x:Class="App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Page1.xaml"
@@ -55,16 +55,14 @@ Imports System.Data
Imports System.Xml
Imports System.Configuration
-Namespace ${StandardNamespace}
- ''' <summary>
- ''' Interaction logic for App.xaml
- ''' </summary>
- Public Partial Class App
- Inherits Application
-
- End Class
-End Namespace]]></File>
- <File name="Page1.xaml" language="XML" buildAction="Page"><![CDATA[<Page x:Class="${StandardNamespace}.Page1"
+''' <summary>
+''' Interaction logic for App.xaml
+''' </summary>
+Public Partial Class App
+ Inherits Application
+
+End Class]]></File>
+ <File name="Page1.xaml" language="XML" buildAction="Page"><![CDATA[<Page x:Class="Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Page1"
@@ -87,18 +85,16 @@ Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
-Namespace ${StandardNamespace}
- /// <summary>
- /// Interaction logic for Page1.xaml
- /// </summary>
- Public Partial Class Page1
- Inherits Page
+''' <summary>
+''' Interaction logic for Page1.xaml
+''' </summary>
+Public Partial Class Page1
+ Inherits Page
- Public Sub New()
- InitializeComponent()
- End Sub
- End Class
-End Namespace]]></File>
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+End Class]]></File>
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" />
<File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" />
<File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" />

0 comments on commit 0365a3f

Please sign in to comment.