protected override void Arrange()
        {
            base.Arrange();

            backingStoreProperty = (ElementReferenceProperty)CacheManager.Property("CacheStorage");
            backingStoreProperty.Value = "backing store";
        }
        protected override void Arrange()
        {
            base.Arrange();

            elementReferencesChanged = false;
            CachingViewModel.ElementReferencesChanged += (sender, args) => elementReferencesChanged = true;

            defaultCacheManagerProperty = (ElementReferenceProperty)CachingViewModel.Property("DefaultCacheManager");
            defaultCacheManagerProperty.Initialize(null);
        }
        protected override void Arrange()
        {
            base.Arrange();
            defaultCacheManagerProperty = (ElementReferenceProperty)CachingViewModel.Property("DefaultCacheManager");
            defaultCacheManagerProperty.Initialize(null);

            cacheManager = CachingViewModel.GetDescendentsOfType<CacheManagerData>().First();

            defaultCacheManagerPropertyChangedListener = new PropertyChangedListener(defaultCacheManagerProperty);
        }
        private static string GetMissingReferenceMessage(ElementReferenceProperty referenceProperty)
        {
            if (referenceProperty.ContainingScopeElement != null)
            {
                return string.Format(
                    CultureInfo.CurrentCulture,
                    Properties.Resources.ValidationElementReferenceMissingWithScope,
                    referenceProperty.ContainingScopeElement.Name);
            }

            return Properties.Resources.ValidationElementReferenceMissing;
        }
        protected override void Arrange()
        {
            base.Arrange();

            var sourceModel = Container.Resolve<ConfigurationSourceModel>();
            LoggingViewModel = sourceModel.AddSection(LoggingSettings.SectionName, LoggingSection);

            elementReferencesChanged = false;
            LoggingViewModel.ElementReferencesChanged += (sender, args) => elementReferencesChanged = true;

            defaultCacheManagerProperty = (ElementReferenceProperty)LoggingViewModel.Property("DefaultCategory");
            defaultCacheManagerProperty.Initialize(null);
        }
        protected override void Arrange()
        {
            base.Arrange();

            var sourceModel = Container.Resolve<ConfigurationSourceModel>();
            LoggingViewModel = sourceModel.AddSection(LoggingSettings.SectionName, LoggingSection);

            defaultCategoryProperty = (ElementReferenceProperty)LoggingViewModel.Property("DefaultCategory");
            defaultCategoryProperty.Initialize(null);

            traceSource = LoggingViewModel.GetDescendentsOfType<TraceSourceData>().First();

            defaultCacheManagerPropertyChangedListener = new PropertyChangedListener(defaultCategoryProperty);
        }
        protected override void Arrange()
        {
            base.Arrange();

            ConfigurationSourceModel sourceModel = Container.Resolve<ConfigurationSourceModel>();
            var section = sourceModel.AddSection(ConfigurationSourceSection.SectionName, new ConfigurationSourceSection()
            {
                Sources = { { new FileConfigurationSourceElement("file1", "file1") },
                            { new FileConfigurationSourceElement("file2", "file1") },
                            { new SystemConfigurationSourceElement("system") }},
                RedirectedSections = {{new RedirectedSectionElement(){Name = "redirect" }}}
            });


            sourceProperty = (ElementReferenceProperty) section.GetDescendentsOfType<RedirectedSectionElement>().First().Property("SourceName");
        }
        public void then_properties_with_suggested_values_offer_standard_values()
        {
            var exceptionType = model.GetDescendentsOfType<ExceptionTypeData>().First();
            var typeNameProperty = new ElementReferenceProperty(Container.Resolve<IServiceProvider>(), 
                                                                Container.Resolve<ElementLookup>(),
                                                                exceptionType,
                                                                TypeDescriptor.GetProperties(typeof(ExceptionTypeData)).OfType<PropertyDescriptor>().Where(x => x.Name == "Name").First(),
                                                                new Attribute[] { new ReferenceAttribute(typeof(ExceptionHandlingSettings), typeof(ExceptionTypeData)) });
            typeNameProperty.Initialize(new InitializeContext());

            
            Assert.IsTrue(typeNameProperty.BindableProperty is SuggestedValuesBindableProperty);
            Assert.IsTrue(typeNameProperty.BindableProperty is PropertyDescriptor);
            PropertyDescriptor propertyDescriptor = (PropertyDescriptor)typeNameProperty.BindableProperty;
            TypeConverter propertyDescriptorTypeConverter = propertyDescriptor.Converter;

            Assert.IsTrue(propertyDescriptorTypeConverter.GetStandardValuesSupported());
            Assert.IsFalse(propertyDescriptorTypeConverter.GetStandardValuesExclusive());
        }