I have few applications in a project. Each app has its own *.config file.
I need to write configuration app to configure all these apps' *.config files simultaneously with comfortable GUI (only appConfig section of each file).
So I need somehow create wrappers (to use it with WPF DataBinding) for every *.config file appSettings section. But I can't figure out how.
I tried to create wrapper class based on AppSettingsBase or ConfigurationSection (AppSettingsSection class is sealed) and it would work if I was trying to work with application's own config file. But when working with external config, you're having access to AppSettingsSection object, instead of NameValueCollection. And I can't cast NameValueCollection to AppSettingsSection, so I can't work with it using wrapper class.
public sealed class Client_exe_AppConfigSectionHandler : ApplicationSettingsBase开发者_开发百科
    {
        public Client_exe_AppConfigSectionHandler()
        {
        }
        [ConfigurationProperty( "ValidBrushColor",
            DefaultValue = "107814",
            IsRequired = true,
IsKey = true )]
        public string validBrushColor
        {
            get
            {
                return ( string )this[ "ValidBrushColor" ];
            }
            set
            {
                this[ "ValidBrushColor" ] = value;
            }
        }
    }
Wrapper class is needed because I need WPF Data Binding.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论