From 565490bd49689332e312cf9754f90a85eb7fdf8e Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Thu, 27 Oct 2005 12:04:52 +0000 Subject: [PATCH] changed DefaultFileNodeCommands.cs to accept XAML files; added some XAML file templates (Window, Page, FlowDocument, PageFunction, ResourceDictionary, UserControl) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@639 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../file/CSharp/CSharp.AvalonFlowDocument.xft | 35 +++++++++ .../file/CSharp/CSharp.AvalonPage.xft | 61 +++++++++++++++ .../file/CSharp/CSharp.AvalonPageFunction.xft | 78 +++++++++++++++++++ .../CSharp.AvalonResourceDictionary.xft | 33 ++++++++ .../file/CSharp/CSharp.AvalonUserControl.xft | 67 ++++++++++++++++ .../file/CSharp/CSharp.AvalonWindow.xft | 66 ++++++++++++++++ .../project/CSharp/AvalonApplication.xpt | 54 +++++++++++++ .../CSharp/AvalonNavigationApplication.xpt | 54 +++++++++++++ .../Commands/DefaultFileNodeCommands.cs | 6 ++ 9 files changed, 454 insertions(+) create mode 100644 data/templates/file/CSharp/CSharp.AvalonFlowDocument.xft create mode 100644 data/templates/file/CSharp/CSharp.AvalonPage.xft create mode 100644 data/templates/file/CSharp/CSharp.AvalonPageFunction.xft create mode 100644 data/templates/file/CSharp/CSharp.AvalonResourceDictionary.xft create mode 100644 data/templates/file/CSharp/CSharp.AvalonUserControl.xft create mode 100644 data/templates/file/CSharp/CSharp.AvalonWindow.xft diff --git a/data/templates/file/CSharp/CSharp.AvalonFlowDocument.xft b/data/templates/file/CSharp/CSharp.AvalonFlowDocument.xft new file mode 100644 index 0000000000..6d5a31360c --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonFlowDocument.xft @@ -0,0 +1,35 @@ + + + + diff --git a/data/templates/file/CSharp/CSharp.AvalonPage.xft b/data/templates/file/CSharp/CSharp.AvalonPage.xft new file mode 100644 index 0000000000..2f2015c883 --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonPage.xft @@ -0,0 +1,61 @@ + + + + diff --git a/data/templates/file/CSharp/CSharp.AvalonPageFunction.xft b/data/templates/file/CSharp/CSharp.AvalonPageFunction.xft new file mode 100644 index 0000000000..000f2ffa76 --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonPageFunction.xft @@ -0,0 +1,78 @@ + + + + diff --git a/data/templates/file/CSharp/CSharp.AvalonResourceDictionary.xft b/data/templates/file/CSharp/CSharp.AvalonResourceDictionary.xft new file mode 100644 index 0000000000..9f49c04979 --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonResourceDictionary.xft @@ -0,0 +1,33 @@ + + + + diff --git a/data/templates/file/CSharp/CSharp.AvalonUserControl.xft b/data/templates/file/CSharp/CSharp.AvalonUserControl.xft new file mode 100644 index 0000000000..e436510ee1 --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonUserControl.xft @@ -0,0 +1,67 @@ + + + + diff --git a/data/templates/file/CSharp/CSharp.AvalonWindow.xft b/data/templates/file/CSharp/CSharp.AvalonWindow.xft new file mode 100644 index 0000000000..2715a97cad --- /dev/null +++ b/data/templates/file/CSharp/CSharp.AvalonWindow.xft @@ -0,0 +1,66 @@ + + + + diff --git a/data/templates/project/CSharp/AvalonApplication.xpt b/data/templates/project/CSharp/AvalonApplication.xpt index c85a476af1..0454cb75ba 100644 --- a/data/templates/project/CSharp/AvalonApplication.xpt +++ b/data/templates/project/CSharp/AvalonApplication.xpt @@ -125,6 +125,60 @@ So, don't say I did not warn you. :-) Mathias (2005-10-26)]]> + 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)] + + +[assembly: ThemeInfo( + DictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + DictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")]]]> diff --git a/data/templates/project/CSharp/AvalonNavigationApplication.xpt b/data/templates/project/CSharp/AvalonNavigationApplication.xpt index 10bff5c6e9..bfee6c4f65 100644 --- a/data/templates/project/CSharp/AvalonNavigationApplication.xpt +++ b/data/templates/project/CSharp/AvalonNavigationApplication.xpt @@ -100,6 +100,60 @@ So, don't say I did not warn you. :-) Mathias (2005-10-26)]]> + 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)] + + +[assembly: ThemeInfo( + DictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + DictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")]]]> diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/DefaultFileNodeCommands.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/DefaultFileNodeCommands.cs index 480daa4a24..0fc6a943de 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/DefaultFileNodeCommands.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/DefaultFileNodeCommands.cs @@ -145,6 +145,12 @@ namespace ICSharpCode.SharpDevelop.Project.Commands case ".resx": case ".resources": return ItemType.EmbeddedResource; + + // HACK: This isn't really a solution. :-( Maybe in the near + // future we can use the known attributes in the XFT files, too. + case ".xaml": + return ItemType.Page; + default: return ItemType.Content; }