Skip to content

Commit

Permalink
ApplyTmTemplate -> button turns green when pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
ealbu committed Apr 22, 2019
1 parent 9862a2c commit c098723
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 11 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
<data name="Browse_button_Tooltip" xml:space="preserve">
<value>Choose a template...</value>
</data>
<data name="DropDownTriangle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>resources\dropdowntriangle.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GreenDropDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\GreenDropDown.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\GreenDropDown.ico" />
<Resource Include="Resources\DropDownTriangle.ico" />
<Resource Include="Resources\Error.ico" />
<Resource Include="Resources\Download.ico" />
<Resource Include="Resources\Question.ico" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<ResourceDictionary Source="../UiHelpers/ButtonsStyle.xaml" />
<ResourceDictionary Source="../UiHelpers/TextBlockStyle.xaml" />
<ResourceDictionary Source="../UiHelpers/TextBoxStyle.xaml" />
<ResourceDictionary Source="../UiHelpers/DataGridStyle.xaml" />
<ResourceDictionary Source="../UiHelpers/DataGridStyle.xaml"/>
<ResourceDictionary Source="../UiHelpers/DataGridStyle2.xaml"/>
<ResourceDictionary Source="../UiHelpers/Buttons.xaml" />
<ResourceDictionary Source="../UiHelpers/DataGridStyle2.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button" x:Key="SdlWizardStyleButton" BasedOn="{StaticResource SdlSecondaryButtonStyle}">
<Setter Property="MinWidth" Value="70"></Setter>
Expand Down Expand Up @@ -138,7 +138,7 @@
</DataGrid.RowStyle>

<DataGrid.Resources>
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource DgcHeaderStyle}" />
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource DgcHeaderStyle2}" />
</DataGrid.Resources>

<DataGrid.Columns>
Expand Down Expand Up @@ -187,7 +187,7 @@
</DataGrid.Columns>
</DataGrid>

<StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Orientation="Horizontal">
<StackPanel Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Orientation="Horizontal">

<Button Margin="10,10,10,0" Style="{StaticResource SdlWizardStyleButtonGreen}" Command="{Binding ImportCommand}"
IsEnabled="{Binding CanExecuteImport, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Expand Down
26 changes: 20 additions & 6 deletions ApplyTMTemplate/Sdl.Community.ApplyTMTemplate/UI/TimedTextBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,33 @@
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary Source="../UiHelpers/TextBoxStyle.xaml"></ResourceDictionary>
<ControlTemplate x:Key="Unpressed">
<Image Source="../Resources/DropDownTriangle.ico"/>
</ControlTemplate>
<ControlTemplate x:Key="Pressed">
<Image Source="../Resources/GreenDropDown.ico"/>
</ControlTemplate>
</UserControl.Resources>
<Border BorderBrush="Black"
BorderThickness="1"
VerticalAlignment="Center"
CornerRadius="5"
Height="32">
<DockPanel>
<Button DockPanel.Dock="Right"
Height="20"
<Button Name="Button" DockPanel.Dock="Right"
Height="15"
Background="White" BorderBrush="White"
Command="{Binding Command}">
<Image DockPanel.Dock="Right" Source="../Resources/GreenDropDown.ico"></Image>
Command="{Binding Command}"
Margin="0,0,8,0">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template" Value="{StaticResource Unpressed}"/>
<Style.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Template" Value="{StaticResource Pressed}"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<TextBox BorderBrush="White"
VerticalAlignment="Center" VerticalContentAlignment="Center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Setter Property="ColumnHeaderStyle" Value="{DynamicResource DgcHeaderStyle}" />
</Style>

<Style x:Key="DgcHeaderStyle" TargetType="DataGridColumnHeader">
<Style x:Key="DgcHeaderStyle2" TargetType="DataGridColumnHeader">
<Setter Property="Height" Value="30" />
<Setter Property="Background" Value="#3EA691" />
<Setter Property="Foreground" Value="White" />
Expand Down

0 comments on commit c098723

Please sign in to comment.