TestTemplatedControl.cs 636 B

12345678910111213141516171819202122
  1. // Copyright (c) The Perspex Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using Perspex.Controls.Primitives;
  4. namespace Perspex.Controls.UnitTests
  5. {
  6. internal class TestTemplatedControl : TemplatedControl
  7. {
  8. public bool OnTemplateAppliedCalled { get; private set; }
  9. public new void AddVisualChild(IVisual visual)
  10. {
  11. base.AddVisualChild(visual);
  12. }
  13. protected override void OnTemplateApplied(INameScope nameScope)
  14. {
  15. OnTemplateAppliedCalled = true;
  16. }
  17. }
  18. }