public TriColorFragmentProvider(TriColorControl control, IRawElementProviderFragmentRoot root, TriColorValue value)
            : base((IRawElementProviderFragment)root /* parent */, root /* fragmentRoot */)
        {
            _control = control;
            _value   = value;

            // Populate static properties
            //
            // In a production app, Name should be localized
            AddStaticProperty(UIA_PropertyIds.UIA_NamePropertyId, _value.ToString());
            AddStaticProperty(UIA_PropertyIds.UIA_ControlTypePropertyId, UIA_ControlTypeIds.UIA_CustomControlTypeId);
            // In a production app, LocalizedControlType should be localized
            AddStaticProperty(UIA_PropertyIds.UIA_LocalizedControlTypePropertyId, "tri-color item");
            AddStaticProperty(UIA_PropertyIds.UIA_ProviderDescriptionPropertyId, "UIASamples: Tri-Color Fragment Provider");
            AddStaticProperty(UIA_PropertyIds.UIA_AutomationIdPropertyId, _value.ToString());
            AddStaticProperty(UIA_PropertyIds.UIA_IsKeyboardFocusablePropertyId, false);
            AddStaticProperty(UIA_PropertyIds.UIA_IsControlElementPropertyId, true);
            AddStaticProperty(UIA_PropertyIds.UIA_IsContentElementPropertyId, false);
        }
        public TriColorFragmentProvider(TriColorControl control, IRawElementProviderFragmentRoot root, TriColorValue value)
            : base((IRawElementProviderFragment) root /* parent */, root /* fragmentRoot */)
        {
            _control = control;
            _value = value;

            // Populate static properties
            //
            // In a production app, Name should be localized
            AddStaticProperty(UIA_PropertyIds.UIA_NamePropertyId, _value.ToString());
            AddStaticProperty(UIA_PropertyIds.UIA_ControlTypePropertyId, UIA_ControlTypeIds.UIA_CustomControlTypeId);
            // In a production app, LocalizedControlType should be localized
            AddStaticProperty(UIA_PropertyIds.UIA_LocalizedControlTypePropertyId, "tri-color item");
            AddStaticProperty(UIA_PropertyIds.UIA_ProviderDescriptionPropertyId, "UIASamples: Tri-Color Fragment Provider");
            AddStaticProperty(UIA_PropertyIds.UIA_AutomationIdPropertyId, _value.ToString());
            AddStaticProperty(UIA_PropertyIds.UIA_IsKeyboardFocusablePropertyId, false);
            AddStaticProperty(UIA_PropertyIds.UIA_IsControlElementPropertyId, true);
            AddStaticProperty(UIA_PropertyIds.UIA_IsContentElementPropertyId, false);
        }