aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2017-12-22 13:28:53 +0200
committerRoy <roy.mail.net@gmail.com>2017-12-22 13:28:53 +0200
commit6091da506db1083f6ca707c24e509ca3470f6a73 (patch)
treeb6d87616e70e8035762aedab4271aeee4955f3a2 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources
parent9989238711695810324960c82b1bd85fc67c570e (diff)
downloadTango-6091da506db1083f6ca707c24e509ca3470f6a73.tar.gz
Tango-6091da506db1083f6ca707c24e509ca3470f6a73.zip
Implemented Remote To Local File Synchronization.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml113
1 files changed, 113 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
index 482e852d6..58bb9ef34 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml
@@ -1,5 +1,7 @@
<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! -->
@@ -61,5 +63,116 @@
<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