mirror of
https://github.com/DarthAffe/RGBSyncPlus
synced 2026-11-10 20:46:28 +00:00
Initial implementation
This commit is contained in:
1 parent
278e22020e
commit
fd662dcf34
63 files changed
+4881
No files matched your search
@@ -0,0 +1,126 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:RGBSyncPlus.Controls"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/ImageButton.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleImageButtonWindow"
|
||||
BasedOn="{StaticResource StyleImageButtonWithOpacity}"
|
||||
TargetType="{x:Type controls:ImageButton}">
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Height" Value="24" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleBlurredDecorationWindow"
|
||||
TargetType="{x:Type controls:BlurredDecorationWindow}">
|
||||
<Setter Property="WindowStyle" Value="None" />
|
||||
<Setter Property="ResizeMode" Value="CanResize" />
|
||||
<Setter Property="AllowsTransparency" Value="True" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="BorderThickness" Value="1,0,1,1" />
|
||||
<Setter Property="DecorationHeight" Value="80" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushWindowBorder}" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushWindowBackground}" />
|
||||
<Setter Property="BackgroundImage" Value="pack://application:,,,/Resources/background.png" />
|
||||
<Setter Property="MinWidth" Value="256" />
|
||||
<Setter Property="MinHeight" Value="144" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="5" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:BlurredDecorationWindow}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<Grid Margin="-12,-12,-12,0">
|
||||
<Viewbox HorizontalAlignment="Center" Stretch="UniformToFill">
|
||||
<Image Source="{TemplateBinding BackgroundImage}" />
|
||||
</Viewbox>
|
||||
|
||||
<Border Name="BlurImage">
|
||||
<Border.OpacityMask>
|
||||
<VisualBrush TileMode="None" Stretch="None" AlignmentX="Center" AlignmentY="Center">
|
||||
<VisualBrush.Visual>
|
||||
<Grid Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=Border}}"
|
||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=Border}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="12" />
|
||||
<RowDefinition Height="92" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="Black" Grid.Row="0" Grid.RowSpan="2" />
|
||||
<Rectangle Fill="Transparent" Grid.Row="2" />
|
||||
</Grid>
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
</Border.OpacityMask>
|
||||
|
||||
<Border.Effect>
|
||||
<BlurEffect Radius="30" />
|
||||
</Border.Effect>
|
||||
|
||||
<Viewbox HorizontalAlignment="Center" Stretch="UniformToFill">
|
||||
<Image Source="{TemplateBinding BackgroundImage}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Border x:Name="PART_Decoration"
|
||||
DockPanel.Dock="Top"
|
||||
HorizontalAlignment="Stretch"
|
||||
Height="{TemplateBinding DecorationHeight}"
|
||||
Background="{TemplateBinding BorderBrush}">
|
||||
<DockPanel HorizontalAlignment="Stretch" Margin="4" LastChildFill="False">
|
||||
<controls:ImageButton x:Name="PART_CloseButton"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource StyleImageButtonWindow}"
|
||||
Image="pack://application:,,,/Resources/close.png"
|
||||
ToolTip="Close" />
|
||||
|
||||
<controls:ImageButton x:Name="PART_MinimizeButton"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource StyleImageButtonWindow}"
|
||||
Image="pack://application:,,,/Resources/minimize.png"
|
||||
ToolTip="Minimize" />
|
||||
|
||||
<controls:ImageButton x:Name="PART_IconButton"
|
||||
DockPanel.Dock="Left"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8"
|
||||
Style="{StaticResource StyleImageButtonWithOpacity}"
|
||||
Image="{TemplateBinding Icon}"
|
||||
ToolTip="https://github.com/DarthAffe/RGBSyncPlus" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<ContentPresenter x:Name="PART_Content" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleButton"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushButtonForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushButtonBorder}" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="Padding" Value="4,2" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource BrushButtonHover}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace RGBSyncPlus.Styles
|
||||
{
|
||||
public class CachedResourceDictionary : ResourceDictionary
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
private static readonly List<string> _cachedDictionaries = new List<string>();
|
||||
private static readonly ResourceDictionary _innerDictionary = new ResourceDictionary();
|
||||
// ReSharper restore
|
||||
|
||||
public new Uri Source
|
||||
{
|
||||
get => null;
|
||||
set
|
||||
{
|
||||
lock (_innerDictionary)
|
||||
{
|
||||
UpdateCache(value);
|
||||
|
||||
MergedDictionaries.Clear();
|
||||
MergedDictionaries.Add(_innerDictionary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
private static void UpdateCache(Uri source)
|
||||
{
|
||||
string uriPath = source.OriginalString;
|
||||
if (_cachedDictionaries.Contains(uriPath)) return;
|
||||
|
||||
_cachedDictionaries.Add(uriPath);
|
||||
|
||||
ResourceDictionary newDictionary = new ResourceDictionary { Source = new Uri(uriPath, source.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative) };
|
||||
CopyDictionaryEntries(newDictionary, _innerDictionary);
|
||||
}
|
||||
|
||||
private static void CopyDictionaryEntries(IDictionary source, IDictionary target)
|
||||
{
|
||||
foreach (object key in source.Keys)
|
||||
if (!target.Contains(key))
|
||||
target.Add(key, source[key]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,305 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:RGBSyncPlus.Controls"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<DrawingBrush x:Key="BrushChessboard"
|
||||
TileMode="Tile"
|
||||
Viewport="0,0,16,16"
|
||||
ViewportUnits="Absolute">
|
||||
<DrawingBrush.Drawing>
|
||||
<GeometryDrawing Brush="#FF808080"
|
||||
Geometry="M5,5 L0,5 0,10 5,10 5,5 10,5 10,0 5,0 Z"/>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<DrawingBrush x:Key="BrushChessboardSmall"
|
||||
TileMode="Tile"
|
||||
Viewport="0,0,8,8"
|
||||
ViewportUnits="Absolute">
|
||||
<DrawingBrush.Drawing>
|
||||
<GeometryDrawing Brush="#FF808080"
|
||||
Geometry="M5,5 L0,5 0,10 5,10 5,5 10,5 10,0 5,0 Z"/>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
|
||||
<Style x:Key="StyleSliderLabel"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Right" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleSliderValue"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleThumbSlider"
|
||||
TargetType="Thumb">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Height" Value="NaN" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border VerticalAlignment="Stretch"
|
||||
Width="4"
|
||||
SnapsToDevicePixels="True"
|
||||
Opacity="0.66"
|
||||
BorderThickness="1"
|
||||
Background="#FFFFFFFF"
|
||||
BorderBrush="#FF000000" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleSlider"
|
||||
TargetType="Slider">
|
||||
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#FF000000" />
|
||||
<Setter Property="IsMoveToPointEnabled" Value="True" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Slider">
|
||||
<Border SnapsToDevicePixels="True"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="#FFFFFFFF">
|
||||
<Border Margin="1"
|
||||
SnapsToDevicePixels="True"
|
||||
Background="{StaticResource BrushChessboardSmall}">
|
||||
<Border SnapsToDevicePixels="True"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Grid x:Name="GridTrackParent" SnapsToDevicePixels="True">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Track x:Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
Width="{Binding ActualWidth, ElementName=GridTrackParent}"
|
||||
Height="{Binding ActualHeight, ElementName=GridTrackParent}">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Visibility="Hidden" Command="Slider.DecreaseLarge" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource StyleThumbSlider}" />
|
||||
</Track.Thumb>
|
||||
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Visibility="Hidden" Command="Slider.IncreaseLarge" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleColorSelector"
|
||||
TargetType="{x:Type controls:ColorSelector}">
|
||||
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Width" Value="504" />
|
||||
<Setter Property="Height" Value="232" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:ColorSelector}">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<DockPanel Margin="{TemplateBinding Padding}">
|
||||
<Border DockPanel.Dock="Left"
|
||||
SnapsToDevicePixels="True"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#FF000000"
|
||||
Background="#FFFFFFFF">
|
||||
<Grid x:Name="PART_Selector"
|
||||
Margin="1"
|
||||
SnapsToDevicePixels="True" />
|
||||
</Border>
|
||||
|
||||
<Slider DockPanel.Dock="Left"
|
||||
Margin="8,0"
|
||||
Height="24"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
Background="{Binding Background, ElementName=PART_SliderHue}"
|
||||
Minimum="{Binding Minimum, ElementName=PART_SliderHue}"
|
||||
Maximum="{Binding Maximum, ElementName=PART_SliderHue}"
|
||||
Value="{Binding Value, ElementName=PART_SliderHue}">
|
||||
<Slider.LayoutTransform>
|
||||
<RotateTransform CenterX="0.5" CenterY="0.5" Angle="90" />
|
||||
</Slider.LayoutTransform>
|
||||
</Slider>
|
||||
|
||||
<DockPanel>
|
||||
<Grid DockPanel.Dock="Bottom">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="12" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="8" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="8" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="12" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="8" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="8" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="4" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="4" />
|
||||
<ColumnDefinition Width="28" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Alpha:" />
|
||||
<Slider x:Name="PART_SliderAlpha"
|
||||
Grid.Row="0" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
Minimum="0"
|
||||
Maximum="255" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderAlpha, StringFormat=##0}" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Hue:" />
|
||||
<Slider x:Name="PART_SliderHue"
|
||||
Grid.Row="2" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
IsSnapToTickEnabled="False"
|
||||
Minimum="0"
|
||||
Maximum="360" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderHue, StringFormat=##0}" />
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Sat:" />
|
||||
<Slider x:Name="PART_SliderSaturation"
|
||||
Grid.Row="4" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
IsSnapToTickEnabled="False"
|
||||
Minimum="0"
|
||||
Maximum="1" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderSaturation, StringFormat=0.00}" />
|
||||
|
||||
<TextBlock Grid.Row="6" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Value:" />
|
||||
<Slider x:Name="PART_SliderValue"
|
||||
Grid.Row="6" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
IsSnapToTickEnabled="False"
|
||||
Minimum="0"
|
||||
Maximum="1" />
|
||||
<TextBlock Grid.Row="6" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderValue, StringFormat=0.00}" />
|
||||
|
||||
<TextBlock Grid.Row="8" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Red:" />
|
||||
<Slider x:Name="PART_SliderRed"
|
||||
Grid.Row="8" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Minimum="0"
|
||||
Maximum="255" />
|
||||
<TextBlock Grid.Row="8" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderRed, StringFormat=000}" />
|
||||
|
||||
<TextBlock Grid.Row="10" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Green:" />
|
||||
<Slider x:Name="PART_SliderGreen"
|
||||
Grid.Row="10" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Minimum="0"
|
||||
Maximum="255" />
|
||||
<TextBlock Grid.Row="10" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderGreen, StringFormat=000}" />
|
||||
|
||||
<TextBlock Grid.Row="12" Grid.Column="0"
|
||||
Style="{StaticResource StyleSliderLabel}"
|
||||
Text="Blue:" />
|
||||
<Slider x:Name="PART_SliderBlue"
|
||||
Grid.Row="12" Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Style="{StaticResource StyleSlider}"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
Minimum="0"
|
||||
Maximum="255" />
|
||||
<TextBlock Grid.Row="12" Grid.Column="4"
|
||||
Style="{StaticResource StyleSliderValue}"
|
||||
Text="{Binding Value, ElementName=PART_SliderBlue, StringFormat=000}" />
|
||||
</Grid>
|
||||
|
||||
<Border HorizontalAlignment="Stretch"
|
||||
Margin="0,0,0,4"
|
||||
SnapsToDevicePixels="True"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#FF000000"
|
||||
Background="#FFFFFFFF">
|
||||
<Border Margin="1"
|
||||
SnapsToDevicePixels="True"
|
||||
Background="{StaticResource BrushChessboard}">
|
||||
<Rectangle x:Name="PART_Preview"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
SnapsToDevicePixels="True" />
|
||||
</Border>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type controls:ColorSelector}" BasedOn="{StaticResource StyleColorSelector}" />
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
@@ -0,0 +1,144 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleComboBoxItem"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushComboBoxForeground}"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||
<Border Name="Border"
|
||||
Padding="2"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource BrushComboBoxHover}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="ComboBoxToggleButton"
|
||||
TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="Border"
|
||||
CornerRadius="0"
|
||||
Background="{StaticResource BrushComboBoxBackground}"
|
||||
BorderBrush="{StaticResource BrushComboBoxBorder}"
|
||||
BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="20" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0"
|
||||
CornerRadius="0"
|
||||
Margin="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="{StaticResource BrushComboBoxBorder}"
|
||||
BorderThickness="0,0,1,0" />
|
||||
|
||||
<Path x:Name="Arrow"
|
||||
Grid.Column="1"
|
||||
Fill="{StaticResource BrushComboBoxForeground}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="M0,0 L0,2 L4,6 L8,2 L8,0 L4,4 z" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource BrushComboBoxHover}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="ComboBoxTextBox"
|
||||
TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="PART_ContentHost"
|
||||
Focusable="False"
|
||||
Background="{TemplateBinding Background}" />
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="StyleComboBox"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type ComboBox}" >
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
||||
<Setter Property="MinWidth" Value="120"/>
|
||||
<Setter Property="MinHeight" Value="20"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushComboBoxForeground}"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource StyleComboBoxItem}" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Grid>
|
||||
<ToggleButton Name="ToggleButton"
|
||||
Template="{StaticResource ComboBoxToggleButton}"
|
||||
Focusable="False"
|
||||
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ClickMode="Press">
|
||||
</ToggleButton>
|
||||
<ContentPresenter Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}"
|
||||
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
||||
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
||||
Margin="6,3,26,3"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
<Popup Name="Popup"
|
||||
Placement="Bottom"
|
||||
IsOpen="{TemplateBinding IsDropDownOpen}"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False"
|
||||
PopupAnimation="Slide">
|
||||
|
||||
<Grid Name="DropDown"
|
||||
SnapsToDevicePixels="True"
|
||||
MinWidth="{TemplateBinding ActualWidth}"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||
<Border x:Name="DropDownBorder"
|
||||
Background="{StaticResource BrushComboBoxBackgroundPopup}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource BrushComboBoxBorder}"/>
|
||||
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
|
||||
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Popup>
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasItems" Value="False">
|
||||
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsGrouping" Value="True">
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
|
||||
<Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0"/>
|
||||
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles"
|
||||
xmlns:controls="clr-namespace:RGBSyncPlus.Controls">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleForm"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type controls:Form}">
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="LabelWidth" Value="112" />
|
||||
<Setter Property="ElementSpacing" Value="8" />
|
||||
<Setter Property="RowSpacing" Value="8" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleLabelForm"
|
||||
TargetType="Label">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
|
||||
<!-- DarthAffe 04.08.2017: Quite a botch, but it works ... -->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Label">
|
||||
<TextBlock HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
FontFamily="{TemplateBinding FontFamily}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontStyle="{TemplateBinding FontStyle}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{TemplateBinding Content}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleTextBlockForm"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleListBoxItemForm"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="Padding" Value="0,2" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border x:Name="Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleListBoxForm"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource StyleListBoxItemForm}" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<Style x:Key="StyleFrameworkElement" TargetType="FrameworkElement">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="UseLayoutRounding" Value="True" />
|
||||
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:RGBSyncPlus.Controls"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/ColorSelector.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleGradientStop"
|
||||
TargetType="ContentControl">
|
||||
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Width" Value="12" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="#FFFFFFFF" />
|
||||
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate DataType="{x:Type GradientStop}">
|
||||
<Grid>
|
||||
<Path Stretch="Fill"
|
||||
Data="M 0.5,0 L 0,0.25 L 0,1 L 1,1 L 1,0.25 Z"
|
||||
StrokeThickness="0"
|
||||
Fill="{StaticResource BrushChessboardSmall}" />
|
||||
<Path Stretch="Fill"
|
||||
Data="M 0.5,0 L 0,0.25 L 0,1 L 1,1 L 1,0.25 Z"
|
||||
Stroke="{Binding BorderBrush, RelativeSource={RelativeSource AncestorType=ContentControl}}"
|
||||
StrokeThickness="{Binding BorderThickness, RelativeSource={RelativeSource AncestorType=ContentControl}}"
|
||||
Fill="{Binding Background, RelativeSource={RelativeSource AncestorType=ContentControl}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding (controls:GradientEditor.IsSelected), RelativeSource={RelativeSource Self}}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="#FF808080" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleGradientEditor"
|
||||
TargetType="{x:Type controls:GradientEditor}">
|
||||
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Height" Value="60" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="GradientStopStyle" Value="{StaticResource StyleGradientStop}" />
|
||||
|
||||
<Setter Property="ColorSelectorTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate DataType="{x:Type GradientStop}">
|
||||
<GroupBox>
|
||||
<controls:ColorSelector Foreground="#FFFFFFFF" SelectedColor="{Binding Color}" />
|
||||
</GroupBox>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:GradientEditor}">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}">
|
||||
|
||||
<DockPanel>
|
||||
<Border DockPanel.Dock="Bottom"
|
||||
Height="16">
|
||||
<Canvas x:Name="PART_Stops"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="Transparent" />
|
||||
</Border>
|
||||
|
||||
<Border Background="{StaticResource BrushChessboard}">
|
||||
<Canvas x:Name="PART_Gradient"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="Transparent" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type controls:GradientEditor}" BasedOn="{StaticResource StyleGradientEditor}" />
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
@@ -0,0 +1,35 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleGroupBoxBox"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="GroupBox">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushBoxBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushBoxBorder}" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="Padding" Value="6,8" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:buttons="clr-namespace:RGBSyncPlus.Controls"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleImageButton"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type buttons:ImageButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Image x:Name="ImageNormal" Margin="{TemplateBinding Padding}"
|
||||
Source="{TemplateBinding Image}" Stretch="Uniform" />
|
||||
<Image x:Name="ImageHover" Margin="{TemplateBinding Padding}"
|
||||
Opacity="0"
|
||||
Source="{TemplateBinding HoverImage}" Stretch="Uniform" />
|
||||
<Image x:Name="ImagePressed" Margin="{TemplateBinding Padding}"
|
||||
Opacity="0"
|
||||
Source="{TemplateBinding PressedImage}" Stretch="Uniform" />
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImageHover">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImageHover">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImagePressed">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="ImagePressed">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleImageButtonWithOpacity"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Opacity" Value="0.66" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type buttons:ImageButton}">
|
||||
<Grid Background="Transparent">
|
||||
<Image x:Name="ImageNormal" Margin="{TemplateBinding Padding}"
|
||||
Source="{TemplateBinding Image}" Stretch="Uniform" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleImageButtonMenu"
|
||||
BasedOn="{StaticResource StyleImageButton}"
|
||||
TargetType="{x:Type buttons:ImageButton}">
|
||||
<Setter Property="Width" Value="180" />
|
||||
<Setter Property="Height" Value="90" />
|
||||
<Setter Property="Margin" Value="0,16" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles"
|
||||
xmlns:converter="clr-namespace:RGBSyncPlus.Converter">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<converter:ScrollOffsetToOpacityMaskConverter x:Key="ScrollOffsetToOpacityMaskConverter" />
|
||||
<converter:ScrollOffsetToVisibilityConverter x:Key="ScrollOffsetToVisibilityConverter" />
|
||||
|
||||
<Style x:Key="ListBoxScrollViewButtonStyle" TargetType="RepeatButton">
|
||||
<Style.Setters>
|
||||
<Setter Property="Background" Value="{StaticResource BrushListBoxScrollButtonBackground}"></Setter>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border x:Name="ButtonBorder"
|
||||
HorizontalAlignment="Center"
|
||||
Width="80"
|
||||
Height="30"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{StaticResource BrushListBoxScrollButtonBorder}"
|
||||
Background="{TemplateBinding Background}">
|
||||
|
||||
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style.Setters>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource BrushListBoxScrollButtonBackgroundHover}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="ListBoxTemplate" TargetType="ListBox">
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="ScrollViewer" CanContentScroll="False" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
|
||||
<ScrollViewer.OpacityMask>
|
||||
<MultiBinding Converter="{StaticResource ScrollOffsetToOpacityMaskConverter}" ConverterParameter="30">
|
||||
<Binding ElementName="ScrollViewer" Path="VerticalOffset" />
|
||||
<Binding ElementName="ScrollViewer" Path="ScrollableHeight" />
|
||||
<Binding ElementName="ScrollViewer" Path="ActualHeight" />
|
||||
</MultiBinding>
|
||||
</ScrollViewer.OpacityMask>
|
||||
|
||||
<ItemsPresenter />
|
||||
</ScrollViewer>
|
||||
|
||||
<DockPanel LastChildFill="False">
|
||||
<RepeatButton DockPanel.Dock="Top" Style="{StaticResource ListBoxScrollViewButtonStyle}"
|
||||
Command="{x:Static ScrollBar.LineUpCommand}" CommandTarget="{Binding ElementName=ScrollViewer}">
|
||||
<RepeatButton.Visibility>
|
||||
<MultiBinding Converter="{StaticResource ScrollOffsetToVisibilityConverter}" ConverterParameter="Top">
|
||||
<Binding ElementName="ScrollViewer" Path="VerticalOffset"/>
|
||||
<Binding ElementName="ScrollViewer" Path="ScrollableHeight"/>
|
||||
</MultiBinding>
|
||||
</RepeatButton.Visibility>
|
||||
<RepeatButton.Content>
|
||||
<Image Source="/RGBSync+;component/Resources/arrow_up.png" Stretch="Uniform" />
|
||||
</RepeatButton.Content>
|
||||
</RepeatButton>
|
||||
<RepeatButton DockPanel.Dock="Bottom" Style="{StaticResource ListBoxScrollViewButtonStyle}"
|
||||
Command="{x:Static ScrollBar.LineDownCommand}" CommandTarget="{Binding ElementName=ScrollViewer}">
|
||||
<RepeatButton.Visibility>
|
||||
<MultiBinding Converter="{StaticResource ScrollOffsetToVisibilityConverter}" ConverterParameter="Bottom">
|
||||
<Binding ElementName="ScrollViewer" Path="VerticalOffset"/>
|
||||
<Binding ElementName="ScrollViewer" Path="ScrollableHeight"/>
|
||||
</MultiBinding>
|
||||
</RepeatButton.Visibility>
|
||||
<RepeatButton.Content>
|
||||
<Image Source="/RGBSync+;component/Resources/arrow_down.png" Stretch="Uniform" />
|
||||
</RepeatButton.Content>
|
||||
</RepeatButton>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="StyleListBoxItemContainer"
|
||||
TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border x:Name="ItemBorder"
|
||||
HorizontalAlignment="Stretch"
|
||||
BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{StaticResource BrushListBoxItemBackground}">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<ColorAnimation Storyboard.TargetName="ItemBorder"
|
||||
Storyboard.TargetProperty="Background.Color"
|
||||
To="{StaticResource ColorListBoxItemBackgroundHover}"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<ColorAnimation Storyboard.TargetName="ItemBorder"
|
||||
Storyboard.TargetProperty="Background.Color"
|
||||
Duration="0:0:0.25" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<ColorAnimation Storyboard.TargetName="ItemBorder"
|
||||
Storyboard.TargetProperty="Background.Color"
|
||||
To="{StaticResource ColorListBoxItemBackgroundSelected}"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<ColorAnimation Storyboard.TargetName="ItemBorder"
|
||||
Storyboard.TargetProperty="Background.Color"
|
||||
Duration="0:0:0.25" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleListBox"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="ListBox">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushButtonForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushButtonBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushButtonBorder}" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="Padding" Value="4,2" />
|
||||
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource StyleListBoxItemContainer}" />
|
||||
<Setter Property="Template" Value="{StaticResource ListBoxTemplate}" />
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles"
|
||||
xmlns:controls="clr-namespace:Transitionals.Controls;assembly=Transitionals"
|
||||
xmlns:transitions="clr-namespace:Transitionals.Transitions;assembly=Transitionals">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<transitions:FadeTransition x:Key="TransitionFade" Duration="0:0:0.200" />
|
||||
|
||||
<Style x:Key="StyleTabControlNavigation"
|
||||
TargetType="TabControl">
|
||||
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Margin" Value="0,-72,0,0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
|
||||
<!-- DarthAffe 04.08.2017: The TabControl is a shitty one to style - if unused parts are removed it throws exceptions ... -->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TabControl">
|
||||
<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="ColumnDefinition0" />
|
||||
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
|
||||
<RowDefinition x:Name="RowDefinition1" Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TabPanel x:Name="HeaderPanel"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="82,2,2,0"
|
||||
Panel.ZIndex="1"
|
||||
IsItemsHost="true"
|
||||
KeyboardNavigation.TabIndex="1" />
|
||||
<Border x:Name="ContentPanel"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Margin="4"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
KeyboardNavigation.DirectionalNavigation="Contained"
|
||||
KeyboardNavigation.TabIndex="2"
|
||||
KeyboardNavigation.TabNavigation="Local">
|
||||
<controls:TransitionElement x:Name="PART_SelectedContentHost"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
Transition="{StaticResource TransitionFade}"
|
||||
Content="{TemplateBinding SelectedContent}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="TabStripPlacement" Value="Bottom">
|
||||
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1" />
|
||||
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
||||
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
||||
<Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
|
||||
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2" />
|
||||
</Trigger>
|
||||
<Trigger Property="TabStripPlacement" Value="Left">
|
||||
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
|
||||
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
||||
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0" />
|
||||
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
|
||||
<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
|
||||
<Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
|
||||
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
||||
<Setter Property="Height" TargetName="RowDefinition1" Value="0" />
|
||||
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2" />
|
||||
</Trigger>
|
||||
<Trigger Property="TabStripPlacement" Value="Right">
|
||||
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
|
||||
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
||||
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1" />
|
||||
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
|
||||
<Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
|
||||
<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
|
||||
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
||||
<Setter Property="Height" TargetName="RowDefinition1" Value="0" />
|
||||
<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StyleTabItemNavigation"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="TabItem">
|
||||
|
||||
<Setter Property="Height" Value="72" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeNavigation}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel Decorative" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TabItem">
|
||||
<Border Margin="8,0"
|
||||
Padding="4"
|
||||
IsHitTestVisible="True"
|
||||
BorderThickness="0"
|
||||
Background="Transparent">
|
||||
<Grid>
|
||||
<TextBlock x:Name="TxtBlurred"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="Black"
|
||||
Opacity="0"
|
||||
Foreground="{StaticResource BrushNavigationItemBlur}"
|
||||
Text="{TemplateBinding Header}">
|
||||
<TextBlock.Effect>
|
||||
<BlurEffect Radius="{StaticResource DoubleNavigationBlurRadius}" />
|
||||
</TextBlock.Effect>
|
||||
</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{StaticResource BrushNavigationItem}"
|
||||
Text="{TemplateBinding Header}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<!--<DataTrigger Binding="{Binding RelativeSource={RelativeSource PreviousData}}" Value="{x:Null}">
|
||||
<Setter Property="Margin" Value="80,0,0,0" />
|
||||
</DataTrigger>-->
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="TxtBlurred">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="TxtBlurred">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="TxtBlurred">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard TargetName="TxtBlurred">
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style BasedOn="{StaticResource StyleTabItemNavigation}" TargetType="TabItem" />
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles"
|
||||
xmlns:attached="clr-namespace:RGBSyncPlus.Attached">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleSlider"
|
||||
BasedOn="{StaticResource {x:Type Slider}}"
|
||||
TargetType="Slider">
|
||||
|
||||
<!-- ReSharper disable Xaml.RedundantStyledValue - -->
|
||||
<Setter Property="attached:SliderValue.IsShown" Value="True" />
|
||||
<Setter Property="attached:SliderValue.Background" Value="{StaticResource BrushTooltipBackground}" />
|
||||
<Setter Property="attached:SliderValue.BorderBrush" Value="{StaticResource BrushTooltipBorder}" />
|
||||
<Setter Property="attached:SliderValue.Foreground" Value="{StaticResource BrushTooltipForeground}" />
|
||||
<Setter Property="attached:SliderValue.FontSize" Value="{StaticResource FontSizeTooltip}" />
|
||||
<Setter Property="attached:SliderValue.Font" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<!-- ReSharper restore Xaml.RedundantStyledValue -->
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.2" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleTextBox"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="TextBox">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushTextBoxForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeDefault}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
<Setter Property="Background" Value="{StaticResource BrushTextBoxBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushTextBoxBorder}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBoxBase}">
|
||||
<Border Name="Border"
|
||||
Padding="2"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<ScrollViewer x:Name="PART_ContentHost" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushTextBoxBorderHover}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsFocused" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BrushTextBoxBorderFocused}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:presentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
|
||||
<!-- ### Colors ### -->
|
||||
<Color x:Key="ColorGainsboro">#FFDCDCDC</Color>
|
||||
<Color x:Key="ColorBuckinghamGray">#FF2A2A2A</Color>
|
||||
<Color x:Key="ColorBuckinghamGrayTransparent">#B82A2A2A</Color>
|
||||
<Color x:Key="ColorJetBlack">#111111</Color>
|
||||
<Color x:Key="ColorJetBlackTransparent">#B8111111</Color>
|
||||
<Color x:Key="ColorJetBlackSuperTransparent">#60111111</Color>
|
||||
<Color x:Key="ColorBlackTransparent">#50000000</Color>
|
||||
<Color x:Key="ColorBananaYellow">#FFE135</Color>
|
||||
|
||||
<!-- ### Brushes ### -->
|
||||
<SolidColorBrush x:Key="BrushBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
<SolidColorBrush x:Key="BrushForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
|
||||
<!-- Window -->
|
||||
<SolidColorBrush x:Key="BrushWindowBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushWindowBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
|
||||
<!-- Box -->
|
||||
<SolidColorBrush x:Key="BrushBoxBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushBoxBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackSuperTransparent}" />
|
||||
|
||||
<!-- ToolTip -->
|
||||
<SolidColorBrush x:Key="BrushTooltipForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushTooltipBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
<SolidColorBrush x:Key="BrushTooltipBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
|
||||
<!-- ComboBox -->
|
||||
<SolidColorBrush x:Key="BrushComboBoxForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushComboBoxBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorBuckinghamGrayTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushComboBoxBackgroundPopup" presentationOptions:Freeze="True" Color="{StaticResource ColorBuckinghamGray}" />
|
||||
<SolidColorBrush x:Key="BrushComboBoxBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushComboBoxHover" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
<SolidColorBrush x:Key="BrushComboBoxBackgroundGroupHeader" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackSuperTransparent}" />
|
||||
|
||||
<!-- Button -->
|
||||
<SolidColorBrush x:Key="BrushButtonForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushButtonBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorBuckinghamGrayTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushButtonBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushButtonHover" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
|
||||
<!-- ListBox -->
|
||||
<SolidColorBrush x:Key="BrushListBoxForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushListBoxScrollButtonBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackSuperTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushListBoxScrollButtonBackgroundHover" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushListBoxScrollButtonBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushListBoxItemBackground" presentationOptions:Freeze="True" Color="#00111111" />
|
||||
<Color x:Key="ColorListBoxItemBackgroundHover">#60111111</Color>
|
||||
<Color x:Key="ColorListBoxItemBackgroundSelected">#B8111111</Color>
|
||||
|
||||
<!-- TextBox -->
|
||||
<SolidColorBrush x:Key="BrushTextBoxForeground" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushTextBoxBackground" presentationOptions:Freeze="True" Color="{StaticResource ColorBuckinghamGrayTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushTextBoxBorder" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlackTransparent}" />
|
||||
<SolidColorBrush x:Key="BrushTextBoxBorderHover" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
<SolidColorBrush x:Key="BrushTextBoxBorderFocused" presentationOptions:Freeze="True" Color="{StaticResource ColorJetBlack}" />
|
||||
|
||||
<!-- Navigation -->
|
||||
<SolidColorBrush x:Key="BrushNavigationItem" presentationOptions:Freeze="True" Color="{StaticResource ColorGainsboro}" />
|
||||
<SolidColorBrush x:Key="BrushNavigationItemBlur" presentationOptions:Freeze="True" Color="{StaticResource ColorBananaYellow}" />
|
||||
|
||||
|
||||
<!-- ### Border'n'stuff ### -->
|
||||
<sys:Double x:Key="DoubleNavigationBlurRadius">40</sys:Double>
|
||||
|
||||
|
||||
<!-- ### Fonts ### -->
|
||||
<sys:Double x:Key="FontSizeDefault">14</sys:Double>
|
||||
<sys:Double x:Key="FontSizeTooltip">14</sys:Double>
|
||||
<sys:Double x:Key="FontSizeNavigation">22</sys:Double>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,31 @@
|
||||
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:styles="clr-namespace:RGBSyncPlus.Styles">
|
||||
|
||||
<styles:CachedResourceDictionary.MergedDictionaries>
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
||||
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
||||
</styles:CachedResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="StyleToolTip"
|
||||
BasedOn="{StaticResource StyleFrameworkElement}"
|
||||
TargetType="{x:Type ToolTip}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BrushTooltipForeground}" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeTooltip}" />
|
||||
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToolTip}">
|
||||
<Border BorderThickness="1"
|
||||
BorderBrush="{StaticResource BrushTooltipBorder}"
|
||||
Background="{StaticResource BrushTooltipBackground}">
|
||||
<ContentPresenter Margin="6,4" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</styles:CachedResourceDictionary>
|
||||
|
||||
Reference in new issue
Block a user