CardIdleRemastered.AppVisualSettings.GetBrushes C# (CSharp) Метод

GetBrushes() публичный Метод

public GetBrushes ( ) : void
Результат void
        public void GetBrushes()
        {
            var res = App.CardIdle.Resources;
            var br = res.Keys.OfType<string>()
                .Where(key => key.StartsWith("Dyn"))
                .Select(resKey => new AppBrush(resKey, ((SolidColorBrush)res[resKey]).Color))
                .ToList();
            AppBrushes = new ObservableCollection<AppBrush>(br);
        }

Usage Example

        private void SettingsDialog()
        {
            var vis = new AppVisualSettings();
            vis.GetBrushes();

            vis.BackgroundUrl = CustomBackgroundUrl;
            if (String.IsNullOrEmpty(vis.BackgroundUrl))
                vis.BackgroundUrl = BackgroundUrl;

            vis.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == "BackgroundUrl")
                {
                    CustomBackgroundUrl = vis.BackgroundUrl;
                }
            };

            var sw = new SettingsWindow();
            sw.DataContext = vis;
            sw.ShowDialog();
        }