1 // -------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All Rights Reserved.
3 // -------------------------------------------------------------------
6 // This is used by PropertInspector\CategoryContainer.xaml
7 // For example automation:AutomationElement.Id="CategoryCheckBox"
8 // I'm not sure that this is actually necessary
9 // But by including this we minimize the changes to CategoryContainer.xaml
11 //From \\authoring\Sparkle\Source\1.0.1083.0\Common\Source\Diagnostics
12 namespace System.Activities.Presentation.Internal.PropertyEditing.FromExpression.Diagnostics.Automation
16 using System.Activities.Presentation;
19 // This DP is intended to be used in XAML property binding scenarios since FrameworkElement.Name is no longer available.
21 internal static class AutomationElement
23 public static readonly DependencyProperty IdProperty = DependencyProperty.RegisterAttached("Id", typeof(string), typeof(AutomationElement));
25 public static string GetId(DependencyObject o)
29 throw FxTrace.Exception.ArgumentNull("o");
32 return (string)o.GetValue(AutomationElement.IdProperty);
35 public static void SetId(DependencyObject o, string val)
39 throw FxTrace.Exception.ArgumentNull("o");
42 o.SetValue(AutomationElement.IdProperty, val);