Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
fixed namespace problems in VB WPF templates
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Oct 27, 2010
1 parent 27f1e11 commit 0365a3f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 109 deletions.
22 changes: 11 additions & 11 deletions data/templates/file/VBNet/VBNet.WPFPage.xft
Expand Up @@ -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}">
Expand All @@ -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/>
Expand Down
59 changes: 28 additions & 31 deletions data/templates/file/VBNet/VBNet.WPFPageFunction.xft
Expand Up @@ -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>
Expand All @@ -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/>
Expand Down
24 changes: 12 additions & 12 deletions data/templates/file/VBNet/VBNet.WPFUserControl.xft
Expand Up @@ -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
Expand All @@ -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/>
Expand Down
22 changes: 11 additions & 11 deletions data/templates/file/VBNet/VBNet.WPFWindow.xft
Expand Up @@ -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">
Expand All @@ -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/>
Expand Down
40 changes: 18 additions & 22 deletions data/templates/project/VBNet/WPFApplication.xpt
Expand Up @@ -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">
Expand All @@ -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"
Expand All @@ -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" />
Expand Down
40 changes: 18 additions & 22 deletions data/templates/project/VBNet/WPFNavigationApplication.xpt
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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" />
Expand Down

0 comments on commit 0365a3f

Please sign in to comment.