aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d9.tar.gz
Tango-00a491d9.zip
merge
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.xaml152
1 files changed, 31 insertions, 121 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
index d8e2017ec..177a4fe75 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
@@ -4,13 +4,12 @@
xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
- xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
<ResourceDictionary.MergedDictionaries>
-
+
<!--WPF Extended Toolkit-->
<!--<ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic/Brushes.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/Generic/Buttons.xaml"/>
@@ -29,9 +28,7 @@
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml">
</ResourceDictionary>
- -->
- <!--Material Design-->
- <!--
+ --><!--Material Design--><!--
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml">
</ResourceDictionary>-->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml">
@@ -66,13 +63,6 @@
<!--Fonts-->
<ResourceDictionary>
<FontFamily x:Key="digital-7">../Fonts/#digital-7</FontFamily>
- <FontFamily x:Key="flexo">../Fonts/#flexo</FontFamily>
- </ResourceDictionary>
-
- <!--Images-->
- <ResourceDictionary>
- <BitmapImage x:Key="MachineBig" UriSource="../Images/machine_new.png"></BitmapImage>
- <BitmapImage x:Key="MachineSmall" UriSource="../Images/machine_new_small.png"></BitmapImage>
</ResourceDictionary>
<!--Styles-->
@@ -536,19 +526,23 @@
</Setter.Value>
</Setter>
</Style>
-
+
<ControlTemplate x:Key="TransparentPopupContentDownTemplate" TargetType="ContentControl">
<Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}"
Margin="6" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
- <Border Background="Transparent" BorderBrush="{DynamicResource MaterialDesignShadowBrush}" BorderThickness="1" CornerRadius="2">
+ <Border Background="Transparent"
+ BorderBrush="{DynamicResource MaterialDesignShadowBrush}"
+ BorderThickness="1"
+ CornerRadius="2">
<Border.Effect>
<BlurEffect Radius="6"/>
</Border.Effect>
</Border>
- <Grid Margin="1" SnapsToDevicePixels="True">
+ <Grid Margin="1"
+ SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
@@ -567,18 +561,29 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
- <Border Grid.Column="0" Width="{StaticResource PopupLeftRightMargin}" Background="{DynamicResource ComboBox.Floating.Background}" />
- <Grid Grid.Column="1"
- Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type materialDesign:ComboBoxPopup}}, Path=VisiblePlacementWidth}"
- Height="0"/>
- <Border Grid.Column="2" MinWidth="{StaticResource PopupLeftRightMargin}" Background="{DynamicResource ComboBox.Floating.Background}"/>
+ <Border Grid.Column="0"
+ Width="{StaticResource PopupLeftRightMargin}"
+ Background="{DynamicResource ComboBox.Floating.Background}"
+ />
+ <Grid Grid.Column="1"
+ Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type materialDesign:ComboBoxPopup}}, Path=VisiblePlacementWidth}"
+ Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/>
+ <Border Grid.Column="2"
+ MinWidth="{StaticResource PopupLeftRightMargin}"
+ Background="{DynamicResource ComboBox.Floating.Background}"
+ />
</Grid>
- <Border Grid.Row="2" Background="{DynamicResource ComboBox.Floating.Background}" Height="0"/>
+ <Border Grid.Row="2"
+ Background="{DynamicResource ComboBox.Floating.Background}"
+ Height="{StaticResource PopupContentPresenterExtend}"/>
<ContentPresenter Grid.Row="3"/>
- <Border Grid.Row="4" CornerRadius="0 0 2 2" Height="{StaticResource PopupTopBottomMargin}" Background="{DynamicResource ComboBox.Floating.Background}" />
+ <Border Grid.Row="4"
+ CornerRadius="0 0 2 2"
+ Height="{StaticResource PopupTopBottomMargin}"
+ Background="{DynamicResource ComboBox.Floating.Background}" />
</Grid>
</Grid>
</ControlTemplate>
@@ -645,7 +650,7 @@
Visibility="{Binding Path=(materialDesign:TextFieldAssist.DecorationVisibility), RelativeSource={RelativeSource TemplatedParent}}"/>
<materialDesign:ComboBoxPopup x:Name="PART_Popup"
-
+
AllowsTransparency="true"
Focusable="False"
HorizontalOffset="-11.5"
@@ -655,9 +660,9 @@
UseLayoutRounding="True"
Placement="Custom"
PopupAnimation="Fade"
- VerticalOffset="-10"
+ VerticalOffset="0"
DefaultVerticalOffset="5"
- DownVerticalOffset="{Binding ElementName=templateRoot, Path=ActualHeight}"
+ DownVerticalOffset="-15.5"
UpVerticalOffset="15"
ClassicMode="{Binding Path=(materialDesign:ComboBoxAssist.ClassicMode), RelativeSource={RelativeSource TemplatedParent}}"
UpContentTemplate="{StaticResource PopupContentUpTemplate}"
@@ -678,7 +683,7 @@
<Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignComboBoxItemStyle}" />
</Trigger>
<Trigger SourceName="PART_Popup" Property="IsOpen" Value="True">
- <Setter Property="Background" TargetName="templateRoot" Value="Transparent" />
+ <Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource ComboBox.Floating.Background}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="templateRoot" Property="Opacity" Value="0.56"/>
@@ -769,101 +774,6 @@
</Setter.Value>
</Setter>
</Style>
-
- <Style TargetType="{x:Type controls:SearchComboBox}" BasedOn="{StaticResource MaterialDesignComboBox}">
- <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Once"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type controls:SearchComboBox}">
- <Border Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
-
- <Grid Background="Transparent">
- <DockPanel>
- <Grid VerticalAlignment="Center" Margin="15 10 10 10" DockPanel.Dock="Right" Width="10" Height="10">
- <Path Stretch="Uniform" Data="M7,10L12,15L17,10H7Z" Fill="{StaticResource BlackBrush}">
-
- </Path>
- </Grid>
- <ContentControl Focusable="False" FocusVisualStyle="{x:Null}" Content="{TemplateBinding SelectedItem}" ContentTemplate="{TemplateBinding ItemTemplate}">
-
- </ContentControl>
- </DockPanel>
- <ToggleButton x:Name="btnToggle" Focusable="False" FocusVisualStyle="{x:Null}" KeyboardNavigation.DirectionalNavigation="Once" Opacity="0" Style="{x:Null}" IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=IsOpened,Mode=TwoWay}">
-
- </ToggleButton>
-
- <Popup StaysOpen="False" MinWidth="{Binding ElementName=btnToggle,Path=ActualWidth}" PlacementTarget="{Binding ElementName=btnToggle}" Placement="Bottom" IsOpen="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=IsOpened,Mode=TwoWay}" MaxHeight="{TemplateBinding MaxDropDownHeight}" AllowsTransparency="True">
- <Border Margin="5" Background="{StaticResource WhiteBrush}" CornerRadius="3" Padding="5" MinWidth="{Binding ElementName=btnToggle,Path=ActualWidth}">
- <Border.Effect>
- <DropShadowEffect ShadowDepth="0" />
- </Border.Effect>
- <DockPanel>
- <TextBox x:Name="txt" KeyboardNavigation.DirectionalNavigation="Once" DockPanel.Dock="Top" Margin="10" Padding="0 5" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SearchFilter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
- <ListBox x:Name="list" FocusVisualStyle="{x:Null}" ItemsSource="{TemplateBinding ListItemsSource}" ItemTemplate="{TemplateBinding ItemTemplate}">
-
- </ListBox>
- </DockPanel>
- </Border>
- </Popup>
- </Grid>
-
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="CheckBoxListBoxItem" TargetType="{x:Type ListBoxItem}">
- <Setter Property="SnapsToDevicePixels" Value="true" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListBoxItem">
- <CheckBox Margin="5,2" IsChecked="{TemplateBinding IsSelected}" x:Name="CheckBoxItem"
- Command="{Binding RelativeSource={RelativeSource AncestorType=controls:AllSelectedCheckboxList}, Path=ClickCheckBoxCommand}" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
- <ContentPresenter />
- </CheckBox>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="AllSelectedCheckBoxListStyle" TargetType="{x:Type controls:AllSelectedCheckboxList}" BasedOn="{StaticResource MaterialDesignListBox}">
- <!--<Setter Property="OverridesDefaultStyle" Value="true" />-->
- <Setter Property="SnapsToDevicePixels" Value="true" />
- <Setter Property="SelectionMode" Value="Multiple"/>
- <Setter Property="ItemContainerStyle" Value="{StaticResource CheckBoxListBoxItem}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type controls:AllSelectedCheckboxList}">
- <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <DockPanel>
- <CheckBox x:Name="SelectAllCheckBox" DockPanel.Dock="Top" VerticalAlignment="Center" IsChecked="{Binding AllSelected, Mode=TwoWay,RelativeSource={RelativeSource AncestorType=controls:AllSelectedCheckboxList}}" Margin="5">
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="SelectAll" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}"></TextBlock>
- </CheckBox>
- <ScrollViewer DockPanel.Dock="Bottom" Focusable="false" Padding="{TemplateBinding Padding}">
- <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </ScrollViewer>
- </DockPanel>
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Window">
- <Setter Property="FontFamily" Value="{StaticResource flexo}"></Setter>
- </Style>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>