Browse Source

fixed namespace problems in VB WPF templates

pull/12/head
Siegfried Pammer 15 years ago
parent
commit
0365a3f26c
  1. 22
      data/templates/file/VBNet/VBNet.WPFPage.xft
  2. 57
      data/templates/file/VBNet/VBNet.WPFPageFunction.xft
  3. 24
      data/templates/file/VBNet/VBNet.WPFUserControl.xft
  4. 22
      data/templates/file/VBNet/VBNet.WPFWindow.xft
  5. 38
      data/templates/project/VBNet/WPFApplication.xpt
  6. 38
      data/templates/project/VBNet/WPFNavigationApplication.xpt

22
data/templates/file/VBNet/VBNet.WPFPage.xft

@ -33,7 +33,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <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="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="${FileNameWithoutExtension}"> Title="${FileNameWithoutExtension}">
@ -52,16 +52,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input Imports System.Windows.Input
Imports System.Windows.Media Imports System.Windows.Media
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for ${FileName}
''' Interaction logic for ${FileName} ''' </summary>
''' </summary> Public Partial Class ${ClassName}
Public Partial Class ${ClassName} Inherits Page Inherits Page
Public Sub New()
InitializeComponent() Public Sub New()
End Sub InitializeComponent()
End Class End Sub
End Namespace]]></File> End Class]]></File>
</Files> </Files>
<AdditionalOptions/> <AdditionalOptions/>

57
data/templates/file/VBNet/VBNet.WPFPageFunction.xft

@ -37,7 +37,7 @@
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"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
x:Class="${StandardNamespace}.${FileNameWithoutExtension}" x:Class="${FileNameWithoutExtension}"
x:TypeArguments="sys:String" x:TypeArguments="sys:String"
Title="${FileNameWithoutExtension}"> Title="${FileNameWithoutExtension}">
<Grid> <Grid>
@ -57,40 +57,37 @@ Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation Imports System.Windows.Navigation
Imports System.Windows.Shapes Imports System.Windows.Shapes
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for ${FileName}
''' Interaction logic for ${FileName} ''' </summary>
''' </summary>
Public Partial Class ${FileNameWithoutExtension} Public Partial Class ${FileNameWithoutExtension}
Inherits PageFunction(Of String) Inherits PageFunction(Of String)
Public Sub New() Public Sub New()
InitializeComponent() InitializeComponent()
End Sub 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. ' 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) ' Private Sub OnLoaded(sender As Object, e As RoutedEventArgs)
' End Sub ' End Sub
' '
' Sample Finish Handler ' Sample Finish Handler
' Private Sub OnClickDone(sender As Object, e As RoutedEventArgs) ' Private Sub OnClickDone(sender As Object, e As RoutedEventArgs)
' OnFinish(New ReturnEventArgs(Of String)("The return value")) ' OnFinish(New ReturnEventArgs(Of String)("The return value"))
' End Sub ' End Sub
' To launch this page function, put this code in the launching page. ' To launch this page function, put this code in the launching page.
' Dim pageFunction As New ${FileNameWithoutExtension}() ' Dim pageFunction As New ${FileNameWithoutExtension}()
' pageFunction.[Return] += New ReturnEventHandler(Of String)(OnFileNameWithoutExtensionReturned) ' pageFunction.[Return] += New ReturnEventHandler(Of String)(OnFileNameWithoutExtensionReturned)
' _NavWin.Navigate(pageFunction) ' _NavWin.Navigate(pageFunction)
' '
' This handler goes in the launching page. ' This handler goes in the launching page.
' Public Sub On${FileNameWithoutExtension}Returned(sender As Object, e As ReturnEventArgs(Of String)) ' Public Sub On${FileNameWithoutExtension}Returned(sender As Object, e As ReturnEventArgs(Of String))
' Console.WriteLine("${FileNameWithoutExtension} returned: " & e.Result) ' Console.WriteLine("${FileNameWithoutExtension} returned: " & e.Result)
' End Sub ' End Sub
End Class]]></File>
End Class
End Namespace]]></File>
</Files> </Files>
<AdditionalOptions/> <AdditionalOptions/>

24
data/templates/file/VBNet/VBNet.WPFUserControl.xft

@ -33,14 +33,14 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <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="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">
<Grid> <Grid>
</Grid> </Grid>
</UserControl>]]></File> </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
Imports System.Collections.Generic Imports System.Collections.Generic
Imports System.Text Imports System.Text
@ -51,16 +51,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input Imports System.Windows.Input
Imports System.Windows.Media Imports System.Windows.Media
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for ${FileName}
''' Interaction logic for ${FileName} ''' </summary>
''' </summary> Public Partial Class ${ClassName}
Public Partial Class ${ClassName} Inherits UserControl Inherits UserControl
Public Sub New()
InitializeComponent() Public Sub New()
End Sub InitializeComponent()
End Class End Sub
End Namespace]]></File> End Class]]></File>
</Files> </Files>
<AdditionalOptions/> <AdditionalOptions/>

22
data/templates/file/VBNet/VBNet.WPFWindow.xft

@ -33,7 +33,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <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="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">
@ -52,16 +52,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input Imports System.Windows.Input
Imports System.Windows.Media Imports System.Windows.Media
Namespace ${StandardNamespace} ''' <summary>
' <summary> ''' Interaction logic for ${FileName}
' Interaction logic for ${FileName} ''' </summary>
' </summary> Public Partial Class ${ClassName}
Public Partial Class ${ClassName} Inherits Window Inherits Window
Public Sub New()
InitializeComponent() Public Sub New()
End Sub InitializeComponent()
End Class End Sub
End Namespace]]></File> End Class]]></File>
</Files> </Files>
<AdditionalOptions/> <AdditionalOptions/>

38
data/templates/project/VBNet/WPFApplication.xpt

@ -39,7 +39,7 @@
</PropertyGroup> </PropertyGroup>
<Files> <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="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="Window1.xaml">
@ -54,16 +54,14 @@ Imports System.Data
Imports System.Xml Imports System.Xml
Imports System.Configuration Imports System.Configuration
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for App.xaml
''' Interaction logic for App.xaml ''' </summary>
''' </summary> Public Partial Class App
Public Partial Class App Inherits Application
Inherits Application
End Class End Class]]></File>
End Namespace]]></File> <File name="Window1.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="Window1"
<File name="Window1.xaml" buildAction="Page" language="XML"><![CDATA[<Window x:Class="${StandardNamespace}.Window1"
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"
@ -83,18 +81,16 @@ Imports System.Windows.Documents
Imports System.Windows.Input Imports System.Windows.Input
Imports System.Windows.Media Imports System.Windows.Media
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for Window1.xaml
''' Interaction logic for Window1.xaml ''' </summary>
''' </summary> Public Partial Class Window1
Public Partial Class Window1 Inherits Window
Inherits Window
Public Sub New() Public Sub New()
InitializeComponent() InitializeComponent()
End Sub End Sub
End Class End Class]]></File>
End Namespace]]></File>
<File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" /> <File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" />
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" /> <File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" />
<File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" /> <File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" />

38
data/templates/project/VBNet/WPFNavigationApplication.xpt

@ -39,7 +39,7 @@
</PropertyGroup> </PropertyGroup>
<Files> <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="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"
@ -55,16 +55,14 @@ Imports System.Data
Imports System.Xml Imports System.Xml
Imports System.Configuration Imports System.Configuration
Namespace ${StandardNamespace} ''' <summary>
''' <summary> ''' Interaction logic for App.xaml
''' Interaction logic for App.xaml ''' </summary>
''' </summary> Public Partial Class App
Public Partial Class App Inherits Application
Inherits Application
End Class End Class]]></File>
End Namespace]]></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="${StandardNamespace}.Page1"
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="Page1" Title="Page1"
@ -87,18 +85,16 @@ Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation Imports System.Windows.Navigation
Imports System.Windows.Shapes Imports System.Windows.Shapes
Namespace ${StandardNamespace} ''' <summary>
/// <summary> ''' Interaction logic for Page1.xaml
/// Interaction logic for Page1.xaml ''' </summary>
/// </summary> Public Partial Class Page1
Public Partial Class Page1 Inherits Page
Inherits Page
Public Sub New() Public Sub New()
InitializeComponent() InitializeComponent()
End Sub End Sub
End Class End Class]]></File>
End Namespace]]></File>
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" /> <File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" />
<File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" /> <File name="Properties\WPFAssemblyInfo.vb" src="WPFAssemblyInfo.vb" />
<File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" /> <File name="Properties\MyExtensions\MyWpfExtension.vb" src="MyWpfExtension.vb" />

Loading…
Cancel
Save