diff --git a/Perspex.Controls/Control.cs b/Perspex.Controls/Control.cs index 3962ff12f9..1dcf316abf 100644 --- a/Perspex.Controls/Control.cs +++ b/Perspex.Controls/Control.cs @@ -204,7 +204,7 @@ namespace Perspex.Controls protected virtual DataTemplate FindDataTemplate(object content) { // TODO: This needs to traverse the logical tree, not the visual. - foreach (var i in this.GetVisualAncestors().OfType()) + foreach (var i in this.GetSelfAndVisualAncestors().OfType()) { foreach (DataTemplate dt in i.DataTemplates.Reverse()) { diff --git a/Perspex.Diagnostics/DevTools.cs b/Perspex.Diagnostics/DevTools.cs index 084d4ee9ad..c93d98d718 100644 --- a/Perspex.Diagnostics/DevTools.cs +++ b/Perspex.Diagnostics/DevTools.cs @@ -7,6 +7,7 @@ namespace Perspex.Diagnostics { using Perspex.Controls; + using System.Reactive.Linq; public class DevTools : Decorator { @@ -32,7 +33,7 @@ namespace Perspex.Diagnostics x => new TextBlock {Text = x.GetType().Name }, x => x.VisualChildren), }, - [TreeView.ItemsProperty] = this[DevTools.RootProperty], + [!TreeView.ItemsProperty] = this[!DevTools.RootProperty].Select(x => new[] { x }), } } }; diff --git a/Perspex.Diagnostics/Perspex.Diagnostics.csproj b/Perspex.Diagnostics/Perspex.Diagnostics.csproj index 6643c9fb1c..b42aa091ab 100644 --- a/Perspex.Diagnostics/Perspex.Diagnostics.csproj +++ b/Perspex.Diagnostics/Perspex.Diagnostics.csproj @@ -69,6 +69,20 @@ + + + ..\packages\Rx-Core.2.1.30214.0\lib\Portable-Net45+WinRT45+WP8\System.Reactive.Core.dll + + + ..\packages\Rx-Interfaces.2.1.30214.0\lib\Portable-Net45+WinRT45+WP8\System.Reactive.Interfaces.dll + + + ..\packages\Rx-Linq.2.1.30214.0\lib\Portable-Net45+WinRT45+WP8\System.Reactive.Linq.dll + + + + +