Merge pull request #8 from lolPants/feature/themes-rework

Themes Refactor
This commit is contained in:
Assistant 2020-02-25 15:15:02 -07:00 committed by GitHub
commit 1f643e2a88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1107 additions and 364 deletions

View file

@ -1,4 +1,4 @@
<Application x:Class="ModAssistant.App"
<Application x:Class="ModAssistant.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
@ -11,7 +11,10 @@
<!-- Swapped i88n Definitions -->
<ResourceDictionary Source="Localisation/en-US.xaml" />
<!-- Load default theme. Currently it's Dark, not sure if you want to change it to Light. -->
<!-- Load default Scrollbar theme, in case LoadedTheme doesn't have Scrollbar properties applied. -->
<ResourceDictionary x:Name="DefaultSidebarTheme" Source="Themes/Default Scrollbar.xaml"/>
<!-- Load theme to be modified via the Theme engine. -->
<ResourceDictionary x:Name="LoadedTheme" Source="Themes/Dark.xaml"/>
<!-- Load SVG icons, courtesy of lolPants. -->
@ -28,6 +31,9 @@
<ResourceDictionary x:Name="ComboBoxItem_Style" Source="Styles/ComboBoxItem.xaml"/>
<ResourceDictionary x:Name="ComboBox_Style" Source="Styles/ComboBox.xaml"/>
<ResourceDictionary x:Name="ToggleButton_Style" Source="Styles/ToggleButton.xaml"/>
<ResourceDictionary x:Name="ScrollBar_Style" Source="Styles/ScrollBar.xaml"/>
<ResourceDictionary x:Name="RepeatButton_Style" Source="Styles/RepeatButton.xaml"/>
<ResourceDictionary x:Name="Thumb_Style" Source="Styles/Thumb.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

View file

@ -15,14 +15,22 @@ namespace ModAssistant
{
public class Themes
{
public static string LoadedTheme { get; private set; } //Currently loaded theme
public static List<string> LoadedThemes { get => loadedThemes.Keys.ToList(); } //String of themes that can be loaded
public static string ThemeDirectory => $"{Environment.CurrentDirectory}/Themes"; //Self explanatory.
public static string LoadedTheme { get; private set; }
public static List<string> LoadedThemes { get => loadedThemes.Keys.ToList(); }
public static string ThemeDirectory => $"{Environment.CurrentDirectory}/Themes";
//Local dictionary of ResourceDictionarys mapped by their names.
private static Dictionary<string, ResourceDictionary> loadedThemes = new Dictionary<string, ResourceDictionary>();
private static Dictionary<string, Waifus> loadedWaifus = new Dictionary<string, Waifus>();
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" }; //These themes will always be available to use.
/// <summary>
/// Local dictionary of Resource Dictionaries mapped by their names.
/// </summary>
private static Dictionary<string, Theme> loadedThemes = new Dictionary<string, Theme>();
private static List<string> preInstalledThemes = new List<string> { "Light", "Dark", "Light Pink" };
/// <summary>
/// Index of "LoadedTheme" in App.xaml
/// </summary>
private static readonly int LOADED_THEME_INDEX = 3;
private static List<string> supportedVideoExtensions = new List<string>() { ".mp4", ".webm", ".mkv", ".avi", ".m2ts" };
/// <summary>
/// Load all themes from local Themes subfolder and from embedded resources.
@ -31,46 +39,53 @@ namespace ModAssistant
public static void LoadThemes()
{
loadedThemes.Clear();
loadedWaifus.Clear();
if (Directory.Exists(ThemeDirectory)) //Load themes from Themes subfolder if it exists.
/*
* Begin by loading local themes. We should always load these first.
* I am doing loading here to prevent the LoadTheme function from becoming too crazy.
*/
foreach (string localTheme in preInstalledThemes)
{
string location = $"Themes/{localTheme}.xaml";
Uri local = new Uri(location, UriKind.Relative);
ResourceDictionary localDictionary = new ResourceDictionary();
localDictionary.Source = local;
Theme theme = new Theme(localTheme, localDictionary);
loadedThemes.Add(localTheme, theme);
}
// Load themes from Themes subfolder if it exists.
if (Directory.Exists(ThemeDirectory))
{
foreach (string file in Directory.EnumerateFiles(ThemeDirectory))
{
FileInfo info = new FileInfo(file);
//FileInfo includes the extension in its Name field, so we have to select only the actual name.
string name = Path.GetFileNameWithoutExtension(info.Name);
//Ignore Themes without the xaml extension and ignore themes with the same names as others.
//If requests are made I can instead make a Theme class that splits the pre-installed themes from
//user-made ones so that one more user-made Light/Dark theme can be added.
if (info.Extension.ToLower().Equals(".xaml") && !loadedThemes.ContainsKey(name))
if (info.Extension.ToLower().Equals(".mat"))
{
ResourceDictionary theme = LoadTheme(name);
if (theme != null)
{
loadedThemes.Add(name, theme);
}
Theme theme = LoadZipTheme(ThemeDirectory, name, ".mat");
if (theme is null) continue;
AddOrModifyTheme(name, theme);
}
}
foreach (string file in Directory.EnumerateFiles(ThemeDirectory))
// Finally load any loose theme files in subfolders.
foreach (string directory in Directory.EnumerateDirectories(ThemeDirectory))
{
FileInfo info = new FileInfo(file);
string name = Path.GetFileNameWithoutExtension(info.Name);
//Look for zip files with ".mat" extension.
if (info.Extension.ToLower().Equals(".mat") && !loadedThemes.ContainsKey(name))
{
LoadZipTheme(ThemeDirectory, name, ".mat");
}
string name = directory.Split('\\').Last();
Theme theme = LoadTheme(directory, name);
if (theme is null) continue;
AddOrModifyTheme(name, theme);
}
}
foreach (string localTheme in preInstalledThemes) //Load local themes (Light and Dark)
{
if (!loadedThemes.ContainsKey(localTheme))
{
ResourceDictionary theme = LoadTheme(localTheme, true);
loadedThemes.Add(localTheme, theme);
}
}
if (Options.Instance != null && Options.Instance.ApplicationThemeComboBox != null) //Refresh Themes dropdown in Options screen.
// Refresh Themes dropdown in Options screen.
if (Options.Instance != null && Options.Instance.ApplicationThemeComboBox != null)
{
Options.Instance.ApplicationThemeComboBox.ItemsSource = LoadedThemes;
Options.Instance.ApplicationThemeComboBox.SelectedIndex = LoadedThemes.IndexOf(LoadedTheme);
@ -88,6 +103,7 @@ namespace ModAssistant
Themes.ApplyWindowsTheme();
return;
}
try
{
Themes.ApplyTheme(savedTheme, false);
@ -106,18 +122,44 @@ namespace ModAssistant
/// <param name="sendMessage">Send message to MainText (default: true).</param>
public static void ApplyTheme(string theme, bool sendMessage = true)
{
if (loadedThemes.TryGetValue(theme, out ResourceDictionary newTheme))
if (loadedThemes.TryGetValue(theme, out Theme newTheme))
{
Application.Current.Resources.MergedDictionaries.RemoveAt(2); //We might want to change this to a static integer or search by name.
LoadedTheme = theme;
Application.Current.Resources.MergedDictionaries.Insert(2, newTheme); //Insert our new theme into the same spot as last time.
MainWindow.Instance.BackgroundVideo.Pause();
MainWindow.Instance.BackgroundVideo.Visibility = Visibility.Hidden;
if (newTheme.ThemeDictionary != null)
{
// TODO: Search by name
Application.Current.Resources.MergedDictionaries.RemoveAt(LOADED_THEME_INDEX);
Application.Current.Resources.MergedDictionaries.Insert(LOADED_THEME_INDEX, newTheme.ThemeDictionary);
}
Properties.Settings.Default.SelectedTheme = theme;
Properties.Settings.Default.Save();
if (sendMessage)
{
MainWindow.Instance.MainText = string.Format((string)Application.Current.FindResource("Themes:ThemeSet"), theme);
}
LoadWaifus(theme);
ApplyWaifus();
if (File.Exists(newTheme.VideoLocation))
{
Uri videoUri = new Uri(newTheme.VideoLocation, UriKind.Absolute);
MainWindow.Instance.BackgroundVideo.Visibility = Visibility.Visible;
// Load the source video if it's not the same as what's playing, or if the theme is loading for the first time.
if (!sendMessage || MainWindow.Instance.BackgroundVideo.Source?.AbsoluteUri != videoUri.AbsoluteUri)
{
MainWindow.Instance.BackgroundVideo.Stop();
MainWindow.Instance.BackgroundVideo.Source = videoUri;
}
MainWindow.Instance.BackgroundVideo.Play();
}
ReloadIcons();
}
else
@ -127,26 +169,24 @@ namespace ModAssistant
}
/// <summary>
/// Writes a local theme to disk. You cannot write a theme loaded from the Themes subfolder to disk.
/// Writes an Embedded Resource theme to disk. You cannot write an outside theme to disk.
/// </summary>
/// <param name="themeName">Name of local theme.</param>
public static void WriteThemeToDisk(string themeName)
{
if (!Directory.Exists(ThemeDirectory))
{
Directory.CreateDirectory(ThemeDirectory);
}
Directory.CreateDirectory(ThemeDirectory);
Directory.CreateDirectory($"{ThemeDirectory}\\{themeName}");
if (!File.Exists($@"{ThemeDirectory}\\{themeName}.xaml"))
if (File.Exists($@"{ThemeDirectory}\\{themeName}.xaml") == false)
{
/*
* Light Pink theme is set to build as an Embedded Resource instead of the default Page.
* Any theme that you want to write must be set as an Embedded Resource instead of the default Page.
* This is so that we can grab its exact content from Manifest, shown below.
* Writing it as is instead of using XAMLWriter keeps the source as is with comments, spacing, and organization.
* Using XAMLWriter would compress it into an unorganized mess.
*/
using (Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream($"ModAssistant.Themes.{themeName}.xaml"))
using (FileStream writer = new FileStream($@"{ThemeDirectory}\\{themeName}.xaml", FileMode.Create))
using (FileStream writer = new FileStream($@"{ThemeDirectory}\\{themeName}\\{themeName}.xaml", FileMode.Create))
{
byte[] buffer = new byte[s.Length];
int read = s.Read(buffer, 0, (int)s.Length);
@ -180,39 +220,102 @@ namespace ModAssistant
return;
}
}
ApplyTheme("Light", false);
}
}
/// <summary>
/// Loads a ResourceDictionary from either Embedded Resources or from a file location.
/// Loads a Theme from a directory location.
/// </summary>
/// <param name="name">ResourceDictionary file name.</param>
/// <param name="localUri">Specifies whether or not to search locally or in the Themes subfolder.</param>
/// <param name="directory">The full directory path to the theme.</param>
/// <param name="name">Name of the containing folder.</param>
/// <returns></returns>
private static ResourceDictionary LoadTheme(string name, bool localUri = false)
private static Theme LoadTheme(string directory, string name)
{
string location = $"{Environment.CurrentDirectory}/Themes/{name}.xaml";
if (!File.Exists(location) && !localUri) //Return null if we're looking for an item in the Themes subfolder that doesn't exist.
Theme theme = new Theme(name, null);
theme.Waifus = new Waifus();
foreach (string file in Directory.EnumerateFiles(directory).OrderBy(x => x))
{
return null;
FileInfo info = new FileInfo(file);
bool isPng = info.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase);
bool isSidePng = info.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase);
bool isXaml = info.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase);
if (isPng && !isSidePng)
{
theme.Waifus.Background = new BitmapImage(new Uri(info.FullName));
}
if (isSidePng)
{
theme.Waifus.Sidebar = new BitmapImage(new Uri(info.FullName));
}
if (isXaml)
{
try
{
Uri resourceSource = new Uri(info.FullName);
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Source = resourceSource;
theme.ThemeDictionary = dictionary;
}
catch (Exception ex)
{
string message = string.Format((string)Application.Current.FindResource("Themes:FailedToLoadXaml"), name, ex.Message);
MessageBox.Show(message);
}
}
if (supportedVideoExtensions.Contains(info.Extension))
{
if (info.Name != $"_{name}{info.Extension}" || theme.VideoLocation is null)
{
theme.VideoLocation = info.FullName;
}
}
}
if (localUri) //Change the location of the theme since we're not looking in a directory but rather in ModAssistant itself.
return theme;
}
/// <summary>
/// Modifies an already existing theme, or adds the theme if it doesn't exist
/// </summary>
/// <param name="name">Name of the theme.</param>
/// <param name="theme">Theme to modify/apply</param>
private static void AddOrModifyTheme(string name, Theme theme)
{
if (loadedThemes.TryGetValue(name, out _))
{
location = $"Themes/{name}.xaml";
if (theme.ThemeDictionary != null)
{
loadedThemes[name].ThemeDictionary = theme.ThemeDictionary;
}
if (theme.Waifus?.Background != null)
{
if (loadedThemes[name].Waifus is null) loadedThemes[name].Waifus = new Waifus();
loadedThemes[name].Waifus.Background = theme.Waifus.Background;
}
if (theme.Waifus?.Sidebar != null)
{
if (loadedThemes[name].Waifus is null) loadedThemes[name].Waifus = new Waifus();
loadedThemes[name].Waifus.Sidebar = theme.Waifus.Sidebar;
}
if (!string.IsNullOrEmpty(theme.VideoLocation))
{
loadedThemes[name].VideoLocation = theme.VideoLocation;
}
}
Uri uri = new Uri(location, localUri ? UriKind.Relative : UriKind.Absolute);
ResourceDictionary dictionary = new ResourceDictionary();
try
{
dictionary.Source = uri;
else
{
loadedThemes.Add(name, theme);
}
catch (Exception ex)
{
MessageBox.Show($"Could not load {name}.\n\n{ex.Message}\n\nIgnoring...");
return null;
}
return dictionary;
}
/// <summary>
@ -221,46 +324,74 @@ namespace ModAssistant
/// <param name="directory">Theme directory</param>
/// <param name="name">Theme name</param>
/// <param name="extension">Theme extension</param>
private static void LoadZipTheme(string directory, string name, string extension)
private static Theme LoadZipTheme(string directory, string name, string extension)
{
if (!loadedWaifus.TryGetValue(name, out Waifus waifus))
{
waifus = new Waifus();
loadedWaifus.Add(name, waifus);
}
Waifus waifus = new Waifus();
ResourceDictionary dictionary = null;
using (FileStream stream = new FileStream(Path.Combine(directory, name + extension), FileMode.Open))
using (ZipArchive archive = new ZipArchive(stream))
{
foreach (ZipArchiveEntry file in archive.Entries)
{
if (file.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase) &&
!file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase))
bool isPng = file.Name.EndsWith(".png", StringComparison.OrdinalIgnoreCase);
bool isSidePng = file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase);
bool isXaml = file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase);
if (isPng && !isSidePng)
{
waifus.Background = GetImageFromStream(Utils.StreamToArray(file.Open()));
}
if (file.Name.EndsWith(".side.png", StringComparison.OrdinalIgnoreCase))
if (isSidePng)
{
waifus.Sidebar = GetImageFromStream(Utils.StreamToArray(file.Open()));
}
if (file.Name.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
string videoExtension = $".{file.Name.Split('.').Last()}";
if (supportedVideoExtensions.Contains(videoExtension))
{
if (!loadedThemes.ContainsKey(name))
string videoName = $"{ThemeDirectory}\\{name}\\_{name}{videoExtension}";
Directory.CreateDirectory($"{ThemeDirectory}\\{name}");
if (File.Exists(videoName) == false)
{
try
file.ExtractToFile(videoName, false);
}
else
{
/*
* Check to see if the lengths of each file are different. If they are, overwrite what currently exists.
* The reason we are also checking LoadedTheme against the name variable is to prevent overwriting a file that's
* already being used by ModAssistant and causing a System.IO.IOException.
*/
FileInfo existingInfo = new FileInfo(videoName);
if (existingInfo.Length != file.Length && LoadedTheme != name)
{
ResourceDictionary dictionary = (ResourceDictionary)XamlReader.Load(file.Open());
loadedThemes.Add(name, dictionary);
}
catch (Exception ex)
{
MessageBox.Show($"Could not load {name}.\n\n{ex.Message}\n\nIgnoring...");
file.ExtractToFile(videoName, true);
}
}
}
if (isXaml && loadedThemes.ContainsKey(name) == false)
{
try
{
dictionary = (ResourceDictionary)XamlReader.Load(file.Open());
}
catch (Exception ex)
{
string message = string.Format((string)Application.Current.FindResource("Themes:FailedToLoadXaml"), name, ex.Message);
MessageBox.Show(message);
}
}
}
}
loadedWaifus[name] = waifus;
Theme theme = new Theme(name, dictionary);
theme.Waifus = waifus;
return theme;
}
/// <summary>
@ -277,48 +408,38 @@ namespace ModAssistant
image.CacheOption = BitmapCacheOption.OnLoad;
image.StreamSource = mStream;
image.EndInit();
if (image.CanFreeze)
image.Freeze();
if (image.CanFreeze) image.Freeze();
return image;
}
}
/// <summary>
/// Applies waifus from Dictionary.
/// Applies waifus from currently loaded Theme.
/// </summary>
/// <param name="theme"></param>
private static void ApplyWaifus(string theme)
private static void ApplyWaifus()
{
loadedWaifus.TryGetValue(theme, out Waifus waifus);
MainWindow.Instance.BackgroundImage.ImageSource = waifus.Background;
MainWindow.Instance.SideImage.Source = waifus.Sidebar;
}
Waifus waifus = loadedThemes[LoadedTheme].Waifus;
/// <summary>
/// Loads the waifus from the Themes folder or theme files if they exist.
/// </summary>
/// <param name="name">Theme's name.</param>
private static void LoadWaifus(string name)
{
string location = Path.Combine(Environment.CurrentDirectory, "Themes");
if (!loadedWaifus.TryGetValue(name, out Waifus waifus))
if (waifus?.Background is null)
{
waifus = new Waifus();
loadedWaifus.Add(name, waifus);
MainWindow.Instance.BackgroundImage.Opacity = 0;
}
else
{
MainWindow.Instance.BackgroundImage.Opacity = 1;
MainWindow.Instance.BackgroundImage.ImageSource = waifus.Background;
}
if (File.Exists(Path.Combine(location, name + ".png")))
if (waifus?.Sidebar is null)
{
waifus.Background = new BitmapImage(new Uri(Path.Combine(location, name + ".png")));
MainWindow.Instance.SideImage.Visibility = Visibility.Hidden;
}
if (File.Exists(Path.Combine(location, name + ".side.png")))
else
{
waifus.Sidebar = new BitmapImage(new Uri(Path.Combine(location, name + ".side.png")));
MainWindow.Instance.SideImage.Visibility = Visibility.Visible;
MainWindow.Instance.SideImage.Source = waifus.Sidebar;
}
loadedWaifus[name] = waifus;
ApplyWaifus(name);
}
/// <summary>
@ -342,7 +463,7 @@ namespace ModAssistant
/// <param name="DrawingGroupName">DrawingGroup name for the image.</param>
private static void ChangeColor(ResourceDictionary icons, string ResourceColorName, string DrawingGroupName)
{
Application.Current.Resources[ResourceColorName] = loadedThemes[LoadedTheme][ResourceColorName];
Application.Current.Resources[ResourceColorName] = loadedThemes[LoadedTheme].ThemeDictionary[ResourceColorName];
((GeometryDrawing)((DrawingGroup)icons[DrawingGroupName]).Children[0]).Brush = (Brush)Application.Current.Resources[ResourceColorName];
}
@ -351,5 +472,19 @@ namespace ModAssistant
public BitmapImage Background = null;
public BitmapImage Sidebar = null;
}
private class Theme
{
public string Name;
public ResourceDictionary ThemeDictionary;
public Waifus Waifus = null;
public string VideoLocation = null;
public Theme(string name, ResourceDictionary dictionary)
{
Name = name;
ThemeDictionary = dictionary;
}
}
}
}

View file

@ -150,6 +150,7 @@
<sys:String x:Key="Themes:ThemeMissing">{0} Themes:ThemeMissing</sys:String>
<sys:String x:Key="Themes:SavedTemplateTheme">Themes:SavedTemplateTheme {0}</sys:String>
<sys:String x:Key="Themes:TemplateThemeExists">Themes:TemplateThemeExists</sys:String>
<sys:String x:Key="Themes:FailedToLoadXaml">Themes:FailedToLoadXaml {0} {1}</sys:String>
<!-- Updater Class -->
<sys:String x:Key="Updater:CheckFailed">Updater:CheckFailed</sys:String>

View file

@ -71,7 +71,7 @@
Please read the Beginners Guide on the
<Hyperlink NavigateUri="https://bsmg.wiki/beginners-guide" local:HyperlinkExtensions.IsExternal="True">
Wiki
</Hyperlink>.
</Hyperlink> .
</Span>
<sys:String x:Key="Intro:AgreeButton">I Agree</sys:String>
<sys:String x:Key="Intro:DisagreeButton">Disagree</sys:String>
@ -170,8 +170,8 @@
<Bold>please purchase the game
<Hyperlink NavigateUri="https://beatgames.com/" local:HyperlinkExtensions.IsExternal="True">
HERE
</Hyperlink>.
</Bold>
</Hyperlink>
</Bold>.
</Span>
<Span x:Key="Invalid:List:Line2">
If your copy of the game is
@ -209,6 +209,7 @@
<sys:String x:Key="Themes:ThemeMissing">{0} does not exist.</sys:String>
<sys:String x:Key="Themes:SavedTemplateTheme">Template theme "{0}" saved to Themes folder.</sys:String>
<sys:String x:Key="Themes:TemplateThemeExists">Template theme already exists!</sys:String>
<sys:String x:Key="Themes:FailedToLoadXaml">Failed to load .xaml file for theme {0}: {1}</sys:String>
<!-- Updater Class -->
<sys:String x:Key="Updater:CheckFailed">Couldn't check for updates.</sys:String>

View file

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ModAssistant"
mc:Ignorable="d"
Icon="Resources/icon.ico"
Title="{DynamicResource MainWindow:WindowTitle}" Width="1280" Height="720"
Title="{DynamicResource MainWindow:WindowTitle}"
SizeChanged="Window_SizeChanged"
UIElement.PreviewMouseDown="Window_PreviewMouseDown">
<Grid>
@ -16,6 +16,7 @@
<ImageBrush x:Name="BackgroundImage" Stretch="{DynamicResource BackgroundImageStretch}"/>
</Rectangle.Fill>
</Rectangle>
<MediaElement Visibility="Hidden" LoadedBehavior="Manual" Name="BackgroundVideo" MediaEnded="BackgroundVideo_MediaEnded"/>
<Image x:Name="SideImage" UseLayoutRounding="True" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="{DynamicResource SideImageYPosition}" Width="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelWidth}" Height="{Binding RelativeSource={RelativeSource Self}, Path=Source.PixelHeight}" Stretch="Fill"/>
<Grid Margin="10">
<Grid.RowDefinitions>

View file

@ -39,6 +39,16 @@ namespace ModAssistant
InitializeComponent();
Instance = this;
const int ContentWidth = 1280;
const int ContentHeight = 720;
double ChromeWidth = SystemParameters.WindowNonClientFrameThickness.Left + SystemParameters.WindowNonClientFrameThickness.Right;
double ChromeHeight = SystemParameters.WindowNonClientFrameThickness.Top + SystemParameters.WindowNonClientFrameThickness.Bottom;
double ResizeBorder = SystemParameters.ResizeFrameVerticalBorderWidth;
Width = ChromeWidth + ContentWidth + 2 * ResizeBorder;
Height = ChromeHeight + ContentHeight + 2 * ResizeBorder;
VersionText.Text = App.Version;
if (Utils.IsVoid())
@ -303,5 +313,11 @@ namespace ModAssistant
Mods.Instance.RefreshColumns();
}
}
private void BackgroundVideo_MediaEnded(object sender, RoutedEventArgs e)
{
BackgroundVideo.Position = TimeSpan.Zero;
BackgroundVideo.Play();
}
}
}

View file

@ -1,230 +1,246 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6A224B82-40DA-40B3-94DC-EFBEC2BDDA39}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ModAssistant</RootNamespace>
<AssemblyName>ModAssistant</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Classes\Http.cs" />
<Compile Include="Classes\HyperlinkExtensions.cs" />
<Compile Include="Classes\Promotions.cs" />
<Compile Include="Classes\Diagnostics.cs" />
<Compile Include="Classes\Themes.cs" />
<Compile Include="Classes\Updater.cs" />
<Compile Include="Pages\Intro.xaml.cs">
<DependentUpon>Intro.xaml</DependentUpon>
</Compile>
<Compile Include="Classes\Mod.cs" />
<Page Include="Localisation\en-US.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Localisation\en-DEBUG.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Compile Include="Pages\Invalid.xaml.cs">
<DependentUpon>Invalid.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Loading.xaml.cs">
<DependentUpon>Loading.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Mods.xaml.cs">
<DependentUpon>Mods.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="Classes\Utils.cs" />
<Page Include="Pages\Intro.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Classes\OneClickInstaller.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Pages\Loading.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Invalid.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Mods.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Options.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\Icons.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Button.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\CheckBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBoxItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\GridViewColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Label.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListViewItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\TextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ToggleButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Dark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Light.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Light Pink.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<EmbeddedResource Include="Themes\Ugly Kulu-Ya-Ku.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="Pages\Options.xaml.cs">
<DependentUpon>Options.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6A224B82-40DA-40B3-94DC-EFBEC2BDDA39}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ModAssistant</RootNamespace>
<AssemblyName>ModAssistant</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Classes\Http.cs" />
<Compile Include="Classes\HyperlinkExtensions.cs" />
<Compile Include="Classes\Promotions.cs" />
<Compile Include="Classes\Diagnostics.cs" />
<Compile Include="Classes\Themes.cs" />
<Compile Include="Classes\Updater.cs" />
<Compile Include="Pages\Intro.xaml.cs">
<DependentUpon>Intro.xaml</DependentUpon>
</Compile>
<Compile Include="Classes\Mod.cs" />
<Page Include="Localisation\en-US.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Localisation\en-DEBUG.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Compile Include="Pages\Invalid.xaml.cs">
<DependentUpon>Invalid.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Loading.xaml.cs">
<DependentUpon>Loading.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Mods.xaml.cs">
<DependentUpon>Mods.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="Classes\Utils.cs" />
<Page Include="Pages\Intro.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Classes\OneClickInstaller.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Pages\Loading.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Invalid.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Mods.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Options.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Resources\Icons.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Button.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\CheckBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ComboBoxItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\GridViewColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Label.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ListViewItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\RepeatButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ScrollBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\TextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Thumb.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ToggleButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Dark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Default Scrollbar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Light.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Light Pink.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<EmbeddedResource Include="Themes\Ugly Kulu-Ya-Ku.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="Pages\Options.xaml.cs">
<DependentUpon>Options.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -0,0 +1,105 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
TargetType="{x:Type RepeatButton}"
x:Key="ModAssistantRepeatButton">
<Setter
Property="BorderThickness"
Value="1" />
<Setter
Property="HorizontalContentAlignment"
Value="Center" />
<Setter
Property="VerticalContentAlignment"
Value="Center" />
<Setter
Property="Padding"
Value="1" />
<Setter
Property="Focusable"
Value="False" />
<Setter
Property="IsTabStop"
Value="False" />
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type RepeatButton}">
<Border
Name="border"
BorderThickness="1"
SnapsToDevicePixels="True"
Background="{DynamicResource ScrollBarBackground}"
BorderBrush="{StaticResource ScrollBarBorder}">
<ContentPresenter
Name="contentPresenter"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Focusable="False" />
</Border>
<ControlTemplate.Triggers>
<Trigger
Property="UIElement.IsMouseOver"
Value="True">
<Setter
TargetName="border"
Property="Background"
Value="{DynamicResource ScrollBarArrowHovered}" />
</Trigger>
<Trigger
Property="IsPressed"
Value="True">
<Setter
TargetName="border"
Property="Background"
Value="{DynamicResource ScrollBarArrowClicked}" />
</Trigger>
<Trigger
Property="IsEnabled"
Value="False">
<Setter
TargetName="contentPresenter"
Property="UIElement.Opacity"
Value="0.56" />
<Setter
TargetName="border"
Property="Background"
Value="{DynamicResource ScrollBarDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
TargetType="{x:Type RepeatButton}"
x:Key="ModAssistantSmallRepeatButton">
<Setter
Property="FrameworkElement.OverridesDefaultStyle"
Value="True" />
<Setter
Property="Background"
Value="{DynamicResource ScrollBarBackground}" />
<Setter
Property="Focusable"
Value="False" />
<Setter
Property="IsTabStop"
Value="False" />
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type RepeatButton}">
<Rectangle
Fill="{TemplateBinding Background}"
Height="{TemplateBinding Height}"
Width="{TemplateBinding Width}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,336 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
TargetType="{x:Type ScrollBar}"
x:Key="{x:Type ScrollBar}">
<Setter
Property="Stylus.IsPressAndHoldEnabled"
Value="False" />
<Setter
Property="Stylus.IsFlicksEnabled"
Value="False" />
<Setter
Property="Background"
Value="{DynamicResource ScrollBarBackground}" />
<Setter
Property="BorderBrush"
Value="{DynamicResource ScrollBarBorder}" />
<Setter
Property="Foreground"
Value="{DynamicResource ScrollBarTextColor}" />
<Setter
Property="BorderThickness"
Value="1,0" />
<Setter
Property="Width"
Value="{DynamicResource SystemParameters.VerticalScrollBarWidthKey}" />
<Setter
Property="MinWidth"
Value="16" />
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type ScrollBar}">
<Grid
Name="Bg"
SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition
Height="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
<RowDefinition
Height="*" />
<RowDefinition
Height="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
</Grid.RowDefinitions>
<Border
BorderThickness="{TemplateBinding BorderThickness}"
Grid.Row="1"
Background="{TemplateBinding Background}" />
<RepeatButton
Name="PART_LineUpButton"
Command="{x:Static ScrollBar.LineUpCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
<Path
Name="ArrowTop"
Data="M0,4 C0,4 0,6 0,6 C0,6 3.5,2.5 3.5,2.5 C3.5,2.5 7,6 7,6 C7,6 7,4 7,4 C7,4 3.5,0.5 3.5,0.5 C3.5,0.5 0,4 0,4"
Stretch="Uniform"
Margin="3,4,3,3"
Fill="{DynamicResource ScrollBarArrowColor}" />
</RepeatButton>
<Track
Name="PART_Track"
IsDirectionReversed="True"
IsEnabled="{TemplateBinding IsMouseOver}"
Grid.Row="1">
<Track.DecreaseRepeatButton>
<RepeatButton
Command="{x:Static ScrollBar.PageUpCommand}"
Background="{DynamicResource ScrollBarBackground}"
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton
Command="{x:Static ScrollBar.PageDownCommand}"
Background="{DynamicResource ScrollBarBackground}"
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb
Background="{DynamicResource ScrollBarHandle}"
Style="{DynamicResource ResourceKey=ModAssistantThumb}" />
</Track.Thumb>
</Track>
<RepeatButton
Name="PART_LineDownButton"
Command="{x:Static ScrollBar.LineDownCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Grid.Row="2"
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
<Path
Name="ArrowBottom"
Data="M0,2.5 C0,2.5 0,0.5 0,0.5 C0,0.5 3.5,4 3.5,4 C3.5,4 7,0.5 7,0.5 C7,0.5 7,2.5 7,2.5 C7,2.5 3.5,6 3.5,6 C3.5,6 0,2.5 0,2.5"
Stretch="Uniform"
Margin="3,4,3,3"
Fill="{DynamicResource ScrollBarArrowColor}" />
</RepeatButton>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineDownButton, Path=IsMouseOver}" />
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineDownButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowBottom"
Property="Fill"
Value="{DynamicResource ScrollBarArrowClicked}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineUpButton, Path=IsMouseOver}" />
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineUpButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowTop"
Property="Fill"
Value="{DynamicResource ScrollBarArrowClicked}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineDownButton, Path=IsMouseOver}" />
<Condition
Value="false"
Binding="{Binding ElementName=PART_LineDownButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowBottom"
Property="Fill"
Value="{DynamicResource ScrollBarArrowHovered}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineUpButton, Path=IsMouseOver}" />
<Condition
Value="false"
Binding="{Binding ElementName=PART_LineUpButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowTop"
Property="Fill"
Value="{DynamicResource ScrollBarArrowHovered}" />
</MultiDataTrigger>
<Trigger
Property="IsEnabled"
Value="False">
<Setter
TargetName="ArrowTop"
Property="Fill"
Value="{DynamicResource ScrollBarDisabled}" />
<Setter
TargetName="ArrowBottom"
Property="Fill"
Value="{DynamicResource ScrollBarDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger
Property="ScrollBar.Orientation"
Value="Horizontal">
<Setter
Property="Width"
Value="Auto" />
<Setter
Property="MinWidth"
Value="0" />
<Setter
Property="Height"
Value="{DynamicResource SystemParameters.HorizontalScrollBarHeightKey}" />
<Setter
Property="MinHeight"
Value="{DynamicResource SystemParameters.HorizontalScrollBarHeightKey}" />
<Setter
Property="BorderThickness"
Value="0,1" />
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type ScrollBar}">
<Grid
Name="Bg"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition
Width="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
<ColumnDefinition
Width="0.00001*" />
<ColumnDefinition
Width="{DynamicResource ResourceKey=ScrollBarButtonHeight}" />
</Grid.ColumnDefinitions>
<Border
BorderThickness="{TemplateBinding BorderThickness}"
Grid.Column="1"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" />
<RepeatButton
Name="PART_LineLeftButton"
Command="{x:Static ScrollBar.LineLeftCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
<Path
Name="ArrowLeft"
Data="M3.18,7 C3.18,7 5,7 5,7 C5,7 1.81,3.5 1.81,3.5 C1.81,3.5 5,0 5,0 C5,0 3.18,0 3.18,0 C3.18,0 0,3.5 0,3.5 C0,3.5 3.18,7 3.18,7"
Stretch="Uniform"
Margin="3"
Fill="{DynamicResource ScrollBarArrowColor}" />
</RepeatButton>
<Track
Name="PART_Track"
Grid.Column="1"
IsEnabled="{TemplateBinding IsMouseOver}">
<Track.DecreaseRepeatButton>
<RepeatButton
Command="{x:Static ScrollBar.PageLeftCommand}"
Background="{DynamicResource ScrollBarBackground}"
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton
Command="{x:Static ScrollBar.PageRightCommand}"
Background="{DynamicResource ScrollBarBackground}"
Style="{DynamicResource ResourceKey=ModAssistantSmallRepeatButton}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb
Background="{DynamicResource ScrollBarHandle}"
Style="{DynamicResource ResourceKey=ModAssistantThumb}" />
</Track.Thumb>
</Track>
<RepeatButton
Name="PART_LineRightButton"
Grid.Column="2"
Command="{x:Static ScrollBar.LineRightCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{DynamicResource ResourceKey=ModAssistantRepeatButton}">
<Path
Name="ArrowRight"
Data="M1.81,7 C1.81,7 0,7 0,7 C0,7 3.18,3.5 3.18,3.5 C3.18,3.5 0,0 0,0 C0,0 1.81,0 1.81,0 C1.81,0 5,3.5 5,3.5 C5,3.5 1.81,7 1.81,7"
Stretch="Uniform"
Margin="3"
Fill="{DynamicResource ScrollBarArrowColor}" />
</RepeatButton>
</Grid>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineRightButton, Path=IsMouseOver}" />
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineRightButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowRight"
Property="Fill"
Value="{DynamicResource ScrollBarArrowClicked}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsMouseOver}" />
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowLeft"
Property="Fill"
Value="{DynamicResource ScrollBarArrowClicked}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineRightButton, Path=IsMouseOver}" />
<Condition
Value="false"
Binding="{Binding ElementName=PART_LineRightButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowRight"
Property="Fill"
Value="{DynamicResource ScrollBarArrowHovered}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition
Value="true"
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsMouseOver}" />
<Condition
Value="false"
Binding="{Binding ElementName=PART_LineLeftButton, Path=IsPressed}" />
</MultiDataTrigger.Conditions>
<Setter
TargetName="ArrowLeft"
Property="Fill"
Value="{DynamicResource ScrollBarArrowHovered}" />
</MultiDataTrigger>
<Trigger
Property="IsEnabled"
Value="False">
<Setter
TargetName="ArrowLeft"
Property="Fill"
Value="{DynamicResource ScrollBarDisabled}" />
<Setter
TargetName="ArrowRight"
Property="Fill"
Value="{DynamicResource ScrollBarDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>

View file

@ -0,0 +1,45 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style
TargetType="{x:Type Thumb}"
x:Key="ModAssistantThumb">
<Setter
Property="FrameworkElement.OverridesDefaultStyle"
Value="True" />
<Setter
Property="IsTabStop"
Value="False" />
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="{x:Type Thumb}">
<Rectangle
Name="rectangle"
SnapsToDevicePixels="True"
Height="{TemplateBinding Height}"
Width="{TemplateBinding Width}"
Fill="{DynamicResource ScrollBarHandle}" />
<ControlTemplate.Triggers>
<Trigger
Property="UIElement.IsMouseOver"
Value="True">
<Setter
TargetName="rectangle"
Property="Fill"
Value="{DynamicResource ScrollBarHandleHovered}" />
</Trigger>
<Trigger
Property="Thumb.IsDragging"
Value="True">
<Setter
TargetName="rectangle"
Property="Fill"
Value="{DynamicResource ScrollBarHandleClick}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View file

@ -13,7 +13,7 @@
<Color x:Key="StandardIcon">#AEAEAE</Color>
<!-- Default Text -->
<SolidColorBrush x:Key="TextColor" Color="{StaticResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="TextColor" Color="{DynamicResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="TextHighlighted" Color="White" />
<!-- Buttons (Info/Mods/About/Options as well as More Info and Install/Update) -->
@ -56,9 +56,22 @@
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#66FFFFFF" />
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#696969" />
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
<SolidColorBrush x:Key="CheckboxTickColor" Color="{StaticResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
<!-- Scroll Bars -->
<SolidColorBrush x:Key="ScrollBarBackground" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandle" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="#55FFFFFF"/>
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
<!-- Various important elements that need to be controlled independently -->
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CC0F0F0F"/>
@ -74,7 +87,9 @@
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}" />
<!--Background and Side image settings.-->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
<!-- Fill, None, Uniform, UniformToFill -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
<!-- Bottom, Center, Top, Stretch -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
</ResourceDictionary>

View file

@ -0,0 +1,17 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- This is a default theme for the Scrollbars, in case the provided Theme doesn't have them -->
<!-- Scroll Bars -->
<SolidColorBrush x:Key="ScrollBarBackground" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandle" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
</ResourceDictionary>

View file

@ -49,6 +49,19 @@
<SolidColorBrush x:Key="CheckboxTickColor" Color="White"/>
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFFF80FF"/>
<!-- Scroll Bars -->
<SolidColorBrush x:Key="ScrollBarBackground" Color="#FFFFE9FF"/>
<SolidColorBrush x:Key="ScrollBarBorder" Color="Black"/>
<SolidColorBrush x:Key="ScrollBarTextColor" Color="Black"/>
<SolidColorBrush x:Key="ScrollBarDisabled" Color="#FFBF95C5"/>
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="#FFF9AEF9"/>
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="#FFEB6CFF"/>
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="#FFFF91EB"/>
<SolidColorBrush x:Key="ScrollBarHandle" Color="#FFF19AFF"/>
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="#FFEC72FF"/>
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="#FFF744FF"/>
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
<!-- Various important elements that need to be controlled independently -->
<SolidColorBrush x:Key="ModAssistantBackground" Color="#FFFAE5FF"/>
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFAE5FF"/>
@ -62,7 +75,9 @@
<SolidColorBrush x:Key="OptionsIconColor" Color="White"/>
<!-- Background and Side image settings. -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
<!-- Fill, None, Uniform, UniformToFill -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
<!-- Bottom, Center, Top, Stretch -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
</ResourceDictionary>

View file

@ -55,9 +55,22 @@
<SolidColorBrush x:Key="CheckboxDisabledTickColor" Color="#DDD" />
<SolidColorBrush x:Key="CheckboxHoveredBackground" Color="#909090" />
<SolidColorBrush x:Key="CheckboxHoveredTickColor" Color="White" />
<SolidColorBrush x:Key="CheckboxTickColor" Color="{StaticResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardContent}" />
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="#FFBFBFBF" />
<!-- Scroll Bars -->
<SolidColorBrush x:Key="ScrollBarBackground" Color="#FFD8D8D8"/>
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandle" Color="#FF9B9B9B"/>
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="#FFB9B9B9"/>
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="#55000000"/>
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
<!-- Various important elements that need to be controlled independently -->
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardSecondary}" />
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCF3F3F3"/>
@ -72,8 +85,10 @@
<SolidColorBrush x:Key="AboutIconColor" Color="#FF0000" />
<SolidColorBrush x:Key="OptionsIconColor" Color="#4E3BCE" />
<!--Background and Side image settings.-->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
<!-- Background and Side image settings. -->
<!-- Fill, None, Uniform, UniformToFill -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
<!-- Bottom, Center, Top, Stretch -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
</ResourceDictionary>

View file

@ -51,6 +51,7 @@
<SolidColorBrush x:Key="ModColumnBorderBrush" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ModColumnHeaderHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ModListBackground" Color="{DynamicResource ResourceKey=StandardPrimary}" />
<SolidColorBrush x:Key="ModListBorderBrush" Color="{DynamicResource ResourceKey=StandardBorder}" />
<SolidColorBrush x:Key="ModListItemHighlighted" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ModListItemSelected" Color="{DynamicResource ResourceKey=StandardActive}"/>
@ -73,11 +74,26 @@
<SolidColorBrush x:Key="CheckboxTickColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
<SolidColorBrush x:Key="CheckboxPressedBackground" Color="{DynamicResource ResourceKey=StandardActive}"/>
<!-- Scroll Bars -->
<SolidColorBrush x:Key="ScrollBarBackground" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarBorder" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<SolidColorBrush x:Key="ScrollBarTextColor" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarDisabled" Color="{DynamicResource ResourceKey=StandardSecondary}"/>
<SolidColorBrush x:Key="ScrollBarArrowColor" Color="{DynamicResource ResourceKey=StandardActive}"/>
<SolidColorBrush x:Key="ScrollBarArrowClicked" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarArrowHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandle" Color="{DynamicResource ResourceKey=StandardPrimary}"/>
<SolidColorBrush x:Key="ScrollBarHandleHovered" Color="{DynamicResource ResourceKey=StandardHighlight}"/>
<SolidColorBrush x:Key="ScrollBarHandleClick" Color="{DynamicResource ResourceKey=StandardBorder}"/>
<GridLength x:Key="ScrollBarButtonHeight">0</GridLength>
<!-- Various important elements that need to be controlled independently -->
<SolidColorBrush x:Key="ModAssistantBackground" Color="{DynamicResource ResourceKey=StandardIcon}"/>
<SolidColorBrush x:Key="FrameBackgroundColor" Color="#CCFF51B6"/>
<SolidColorBrush x:Key="BottomStatusBarBackground" Color="#BF489A"/>
<SolidColorBrush x:Key="BottomStatusBarOutline" Color="{DynamicResource ResourceKey=StandardBorder}" />
<SolidColorBrush x:Key="DirectoryBackground" Color="#BF489A"/>
<SolidColorBrush x:Key="DirectoryOutline" Color="{DynamicResource ResourceKey=StandardBorder}" />
<!-- Colors for the corresponding icons. -->
<!-- Info Default: #0DCAC8 -->
@ -89,7 +105,10 @@
<!-- Options Default: #4E3BCE -->
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top, Stretch -->
<!-- Background and Side image settings. -->
<!-- Fill, None, Uniform, UniformToFill -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch>
<!-- Bottom, Center, Top, Stretch -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment>
</ResourceDictionary>