1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
4 namespace System.Activities.Presentation.Internal.PropertyEditing.Editors
8 using System.Activities.Presentation.PropertyEditing;
9 using System.Activities.Presentation.Internal.PropertyEditing.Resources;
12 // SubPropertyViewEditor is a "fake" value editor. We only use it as a marker that exposes
13 // MarkerSubPropertyTemplate as its editor DataTemplates. The XAML code for PropertyContainer
14 // specifically looks for these markers and it switches its InlineRowTemplate to a
15 // sub-property-specific inline row template when found.
17 internal class SubPropertyViewEditor : ExtendedPropertyValueEditor
20 private static SubPropertyViewEditor _instance;
22 // This class can have a private ctor because we instantiate it through code,
23 // not through XAML or attributes
24 private SubPropertyViewEditor()
26 PropertyInspectorResources.GetResources()["MarkerSubPropertyTemplate"] as DataTemplate,
27 PropertyInspectorResources.GetResources()["MarkerSubPropertyTemplate"] as DataTemplate)
32 // Gets the static instance of this class
34 public static SubPropertyViewEditor Instance
37 if (_instance == null)
39 _instance = new SubPropertyViewEditor();