示例#1
0
        /// <summary>
        ///     Add a ResourceDictionary for the specified MahApps style
        ///     The Uri to the source is created by CreateMahappStyleUri
        /// </summary>
        /// <param name="style">
        ///     Style name, this is actually what is added behind
        ///     pack://application:,,,/MahApps.Metro;component/Styles/ (and .xaml is added)
        /// </param>
        public void AddMahappsStyle(string style)
        {
            var packUri = CreateMahappStyleUri(style);

            if (!_resourceProvider.EmbeddedResourceExists(packUri))
            {
                Log.Warn().WriteLine("Style {0} might not be available as {1}.", style, packUri);
            }
            AddResourceDictionary(packUri);
        }