diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml new file mode 100644 index 000000000..58bb9ef34 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -0,0 +1,178 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf" + xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"> + <ResourceDictionary.MergedDictionaries> + <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> + <!-- Accent and AppTheme setting --> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"> + </ResourceDictionary> + <!--Material Design--> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/materialdesigncolor.lightblue.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/materialdesigncolor.yellow.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.TextBlock.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Label.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Slider.xaml"> + </ResourceDictionary> + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.ProgressBar.xaml"/> + + + <!--MahApps Brushes--> + <ResourceDictionary> + <SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource Primary700}" /> + <SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource Primary500}" /> + <SolidColorBrush x:Key="AccentColorBrush2" Color="{DynamicResource Primary400}" /> + <SolidColorBrush x:Key="AccentColorBrush3" Color="{DynamicResource Primary300}" /> + <SolidColorBrush x:Key="AccentColorBrush4" Color="{DynamicResource Primary200}" /> + <SolidColorBrush x:Key="WindowTitleColorBrush" Color="{DynamicResource Primary700}" /> + <SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{DynamicResource Primary500Foreground}" /> + <LinearGradientBrush x:Key="ProgressBrush" EndPoint="0.001,0.5" StartPoint="1.002,0.5"> + <GradientStop Color="{DynamicResource Primary700}" Offset="0" /> + <GradientStop Color="{DynamicResource Primary300}" Offset="1" /> + </LinearGradientBrush> + <SolidColorBrush x:Key="CheckmarkFill" Color="{DynamicResource Primary500}" /> + <SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}" /> + <SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" /> + <SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" /> + </ResourceDictionary> + + <!--Styles--> + <ResourceDictionary> + + <BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> + <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" /> + + <Style TargetType="editors:AutoCompleteTextBox" > + <Setter Property="Focusable" Value="True" /> + <Setter Property="BorderThickness" Value="0 0 0 1"/> + <Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}" /> + <Setter Property="Background" Value="Transparent"/> + <!--<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>--> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="VerticalContentAlignment" Value="Top"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="AllowDrop" Value="true"/> + <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/> + <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> + <Setter Property="Validation.ErrorTemplate" Value="{DynamicResource MaterialDesignValidationErrorTemplate}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type editors:AutoCompleteTextBox}"> + <Grid> + <DockPanel> + <ContentPresenter ContentSource="Icon" + x:Name="PART_Icon" + Visibility="{TemplateBinding IconVisibility}" /> + <Grid> + <TextBlock x:Name="PART_Watermark" + Text="{TemplateBinding Watermark}" + Visibility="Collapsed" + VerticalAlignment="Center" + HorizontalAlignment="Left" + Focusable="False" + Foreground="Gray" + Margin="3,0" /> + <TextBox x:Name="PART_Editor" + Focusable="True" + HorizontalAlignment="Stretch" + VerticalAlignment="Center" + Style="{StaticResource ResourceKey=MaterialDesignTextBox}" + MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" + CharacterCasing="{Binding Path=CharacterCasing, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" + Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}" /> + </Grid> + </DockPanel> + <Popup x:Name="PART_Popup" + IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}" + Width="{TemplateBinding ActualWidth}" + HorizontalOffset="0" + MinHeight="25" + MaxHeight="600" + AllowsTransparency="True" + PopupAnimation="Slide" + Focusable="False"> + <Border Background="White" + BorderThickness="1" + BorderBrush="#BDBDBD" + CornerRadius="0" + Padding="2"> + <Grid> + <ListBox x:Name="PART_Selector" + ItemTemplate="{TemplateBinding ItemTemplate}" + ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" + Focusable="False" + BorderThickness="0" + MaxHeight="{Binding Path=MaxPopupHeight, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}" + ScrollViewer.HorizontalScrollBarVisibility="Auto" + ScrollViewer.VerticalScrollBarVisibility="Auto" + > + </ListBox> + <Border Visibility="{Binding Path=IsLoading, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource ResourceKey=BoolToVisConverter}}"> + <ContentPresenter ContentSource="LoadingContent"/> + </Border> + </Grid> + </Border> + </Popup> + + </Grid> + <!--</Border>--> + <ControlTemplate.Triggers> + <Trigger Property="Text" + Value="" + SourceName="PART_Editor"> + <Setter Property="Visibility" + Value="Visible" + TargetName="PART_Watermark" /> + </Trigger> + <Trigger Property="IconPlacement" + Value="Left"> + <Setter Property="DockPanel.Dock" + Value="Left" + TargetName="PART_Icon" /> + </Trigger> + <Trigger Property="IconPlacement" + Value="Right"> + <Setter Property="DockPanel.Dock" + Value="Right" + TargetName="PART_Icon" /> + </Trigger> + <Trigger Property="Validation.HasError" Value="True"> + <Setter Property="BorderBrush" + Value="Red"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </ResourceDictionary> + + </ResourceDictionary.MergedDictionaries> +</ResourceDictionary>
\ No newline at end of file |
