From ccf4f06a935d39d532cba0f657d3e0da1f5b31c4 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 30 Jan 2015 01:09:28 +0100 Subject: [PATCH] Clarified ContentControl not having a presenter. I kept wondering why I'd written it that way. --- Perspex.Controls/ContentControl.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Perspex.Controls/ContentControl.cs b/Perspex.Controls/ContentControl.cs index 94670d9b64..428e5292e4 100644 --- a/Perspex.Controls/ContentControl.cs +++ b/Perspex.Controls/ContentControl.cs @@ -65,6 +65,9 @@ namespace Perspex.Controls this.presenterSubscription = null; } + // We allow ContentControls without ContentPresenters in the template. This can be + // useful for e.g. a simple ToggleButton that displays an image. There's no need to + // have a ContentPresenter in the visual tree for that. this.presenter = this.FindTemplateChild("contentPresenter"); if (this.presenter != null)