From a0509caede3283d1e4b40a526c3c818e8aa672a4 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 29 Sep 2015 23:34:10 +0200 Subject: [PATCH] Renamed TreeDataTemplate -> FuncTreeDataTemplate. --- samples/TestApplication/Program.cs | 2 +- samples/XamlTestApplication/Program.cs | 2 +- .../Generators/TreeItemContainerGenerator.cs | 2 +- src/Perspex.Controls/Perspex.Controls.csproj | 4 ++-- ...DataTemplate.cs => FuncTreeDataTemplate.cs} | 18 +++++++++--------- ...Template`1.cs => FuncTreeDataTemplate`1.cs} | 18 +++++++++--------- .../Views/LogicalTreeView.cs | 2 +- .../Views/VisualTreeView.cs | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) rename src/Perspex.Controls/Templates/{TreeDataTemplate.cs => FuncTreeDataTemplate.cs} (89%) rename src/Perspex.Controls/Templates/{TreeDataTemplate`1.cs => FuncTreeDataTemplate`1.cs} (88%) diff --git a/samples/TestApplication/Program.cs b/samples/TestApplication/Program.cs index 147a9b0f7c..ce9e4a540d 100644 --- a/samples/TestApplication/Program.cs +++ b/samples/TestApplication/Program.cs @@ -86,7 +86,7 @@ namespace TestApplication { DataTemplates = new DataTemplates { - new TreeDataTemplate( + new FuncTreeDataTemplate( x => new TextBlock { Text = x.Name }, x => x.Children, x => true), diff --git a/samples/XamlTestApplication/Program.cs b/samples/XamlTestApplication/Program.cs index d115b67809..c79fa68899 100644 --- a/samples/XamlTestApplication/Program.cs +++ b/samples/XamlTestApplication/Program.cs @@ -40,7 +40,7 @@ namespace XamlTestApplication { DataTemplates = new DataTemplates { - new TreeDataTemplate( + new FuncTreeDataTemplate( x => new TextBlock { Text = x.Name }, x => x.Children, x => true), diff --git a/src/Perspex.Controls/Generators/TreeItemContainerGenerator.cs b/src/Perspex.Controls/Generators/TreeItemContainerGenerator.cs index 3dabba7aad..4f35084d70 100644 --- a/src/Perspex.Controls/Generators/TreeItemContainerGenerator.cs +++ b/src/Perspex.Controls/Generators/TreeItemContainerGenerator.cs @@ -199,7 +199,7 @@ namespace Perspex.Controls.Generators if (treeTemplate == null) { - treeTemplate = new TreeDataTemplate(typeof(object), template.Build, x => null); + treeTemplate = new FuncTreeDataTemplate(typeof(object), template.Build, x => null); } return treeTemplate; diff --git a/src/Perspex.Controls/Perspex.Controls.csproj b/src/Perspex.Controls/Perspex.Controls.csproj index 91b85d45eb..9085848a74 100644 --- a/src/Perspex.Controls/Perspex.Controls.csproj +++ b/src/Perspex.Controls/Perspex.Controls.csproj @@ -127,7 +127,7 @@ - + @@ -154,7 +154,7 @@ - + diff --git a/src/Perspex.Controls/Templates/TreeDataTemplate.cs b/src/Perspex.Controls/Templates/FuncTreeDataTemplate.cs similarity index 89% rename from src/Perspex.Controls/Templates/TreeDataTemplate.cs rename to src/Perspex.Controls/Templates/FuncTreeDataTemplate.cs index fc99c20d53..0442f9a649 100644 --- a/src/Perspex.Controls/Templates/TreeDataTemplate.cs +++ b/src/Perspex.Controls/Templates/FuncTreeDataTemplate.cs @@ -10,14 +10,14 @@ namespace Perspex.Controls.Templates /// /// A template used to build hierachical data. /// - public class TreeDataTemplate : FuncDataTemplate, ITreeDataTemplate + public class FuncTreeDataTemplate : FuncDataTemplate, ITreeDataTemplate { private readonly Func _itemsSelector; private readonly Func _isExpanded; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The type of data which the data template matches. /// @@ -27,7 +27,7 @@ namespace Perspex.Controls.Templates /// A function which when passed an object of returns the child /// items. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Type type, Func build, Func itemsSelector) @@ -36,7 +36,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The type of data which the data template matches. /// @@ -50,7 +50,7 @@ namespace Perspex.Controls.Templates /// A function which when passed an object of returns the the /// initial expanded state of the node. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Type type, Func build, Func itemsSelector, @@ -60,7 +60,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which determines whether the data template matches the specified data. @@ -71,7 +71,7 @@ namespace Perspex.Controls.Templates /// /// A function which when passed a matching object returns the child items. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func match, Func build, Func itemsSelector) @@ -81,7 +81,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which determines whether the data template matches the specified data. @@ -96,7 +96,7 @@ namespace Perspex.Controls.Templates /// A function which when passed a matching object returns the the initial expanded state /// of the node. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func match, Func build, Func itemsSelector, diff --git a/src/Perspex.Controls/Templates/TreeDataTemplate`1.cs b/src/Perspex.Controls/Templates/FuncTreeDataTemplate`1.cs similarity index 88% rename from src/Perspex.Controls/Templates/TreeDataTemplate`1.cs rename to src/Perspex.Controls/Templates/FuncTreeDataTemplate`1.cs index 68b3ebbf6d..18de28feb6 100644 --- a/src/Perspex.Controls/Templates/TreeDataTemplate`1.cs +++ b/src/Perspex.Controls/Templates/FuncTreeDataTemplate`1.cs @@ -10,10 +10,10 @@ namespace Perspex.Controls.Templates /// A template used to build hierachical data. /// /// The type of the template's data. - public class TreeDataTemplate : TreeDataTemplate + public class FuncTreeDataTemplate : FuncTreeDataTemplate { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which when passed an object of returns a control. @@ -22,7 +22,7 @@ namespace Perspex.Controls.Templates /// A function which when passed an object of returns the child /// items. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func build, Func itemsSelector) : base( @@ -33,7 +33,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which when passed an object of returns a control. @@ -46,7 +46,7 @@ namespace Perspex.Controls.Templates /// A function which when passed an object of returns the the /// initial expanded state of the node. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func build, Func itemsSelector, Func isExpanded) @@ -59,7 +59,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which determines whether the data template matches the specified data. @@ -70,7 +70,7 @@ namespace Perspex.Controls.Templates /// /// A function which when passed a matching object returns the child items. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func match, Func build, Func itemsSelector) @@ -82,7 +82,7 @@ namespace Perspex.Controls.Templates } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// A function which determines whether the data template matches the specified data. @@ -97,7 +97,7 @@ namespace Perspex.Controls.Templates /// A function which when passed a matching object returns the the initial expanded state /// of the node. /// - public TreeDataTemplate( + public FuncTreeDataTemplate( Func match, Func build, Func itemsSelector, diff --git a/src/Perspex.Diagnostics/Views/LogicalTreeView.cs b/src/Perspex.Diagnostics/Views/LogicalTreeView.cs index d68bc71fee..276506bf09 100644 --- a/src/Perspex.Diagnostics/Views/LogicalTreeView.cs +++ b/src/Perspex.Diagnostics/Views/LogicalTreeView.cs @@ -48,7 +48,7 @@ namespace Perspex.Diagnostics.Views { DataTemplates = new DataTemplates { - new TreeDataTemplate(GetHeader, x => x.Children), + new FuncTreeDataTemplate(GetHeader, x => x.Children), }, [!ItemsControl.ItemsProperty] = this.WhenAnyValue(x => x.ViewModel.Nodes), }), diff --git a/src/Perspex.Diagnostics/Views/VisualTreeView.cs b/src/Perspex.Diagnostics/Views/VisualTreeView.cs index 485ed264aa..df7277e396 100644 --- a/src/Perspex.Diagnostics/Views/VisualTreeView.cs +++ b/src/Perspex.Diagnostics/Views/VisualTreeView.cs @@ -49,7 +49,7 @@ namespace Perspex.Diagnostics.Views { DataTemplates = new DataTemplates { - new TreeDataTemplate(GetHeader, x => x.Children), + new FuncTreeDataTemplate(GetHeader, x => x.Children), }, [!ItemsControl.ItemsProperty] = this.WhenAnyValue(x => x.ViewModel.Nodes), }),