Skip to content

Commit

Permalink
Fixing Issue #137 for VS 2013 Teme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Mar 25, 2020
1 parent dd5e5c0 commit 75f704a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
29 changes: 20 additions & 9 deletions source/Components/AvalonDock.Themes.VS2013/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1759,10 +1759,11 @@
</Border>
</Grid>
<ControlTemplate.Triggers>
<!-- Show Header Bar (Window Title and Restore/Maximize/Minimize buttons with highlighting color if this IsActive) -->
<Trigger Property="WindowState" Value="Maximized">
<Setter TargetName="WindowBorder" Property="Padding" Value="3" />
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="True">
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="True">
<Setter TargetName="Header" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}}" />
<Setter TargetName="Header" Property="TextElement.Foreground" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}}" />
</DataTrigger>
Expand Down Expand Up @@ -1819,36 +1820,41 @@
<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedInactivePressedGlyph}}" />
</MultiDataTrigger>

<!-- Document Well : Tab : Button / Selected, active -->
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true">
<!-- Mark Active Document on CLick in Document Well : Tab : Button / Selected, active -->
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true">
<!--Setter TargetName="PART_ImgPinMenu" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" /-->
<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
<Setter TargetName="PART_ImgPinClose" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveGlyph}}" />
</DataTrigger>

<!-- Document Well : Tab : Button / Selected, active, hovered -->
<!-- Highlight Maximize Button of Floating Window on MouseOver -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinMaximize}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
</MultiDataTrigger>

<!-- Highlight Restore Button of Floating Window on MouseOver -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinRestore}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}}" />
<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}}" />
</MultiDataTrigger>

<!-- Highlight Close Button of Floating Window on MouseOver -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseOver, ElementName=PART_PinClose}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}}" />
Expand All @@ -1857,27 +1863,32 @@
</MultiDataTrigger>

<!-- Document Well : Tab : Button / Selected, active, pressed -->
<!-- Highlight Maximize Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away) -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinMaximize}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinMaximize" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
<Setter TargetName="PART_PinMaximize" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
<Setter TargetName="PART_ImgPinMaximize" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
</MultiDataTrigger>

<!-- Highlight Restore Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away) -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinRestore}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinRestore" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
<Setter TargetName="PART_PinRestore" Property="BorderBrush" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBorder}}" />
<Setter TargetName="PART_ImgPinRestore" Property="Fill" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedGlyph}}" />
</MultiDataTrigger>

<!-- Highlight Close Button of Floating Window on MouseClick and Holding Bottun (even when Mouse is moved away) -->
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=Model.RootDocument.IsActive}" Value="true" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsActive}" Value="true" />
<Condition Binding="{Binding IsMouseCaptured, ElementName=PART_PinClose}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter TargetName="PART_PinClose" Property="Background" Value="{DynamicResource {x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActivePressedBackground}}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This program is provided to you under the terms of the Microsoft Public
************************************************************************/

using System.ComponentModel;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
Expand Down Expand Up @@ -108,6 +109,7 @@ private void Model_PropertyChanged(object sender, PropertyChangedEventArgs e)
/// <inheritdoc />
protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
{
Debug.WriteLine("OnPreviewGotKeyboardFocus: " + LayoutItem.ContentId);
SetIsActive();
base.OnPreviewGotKeyboardFocus(e);
}
Expand Down

0 comments on commit 75f704a

Please sign in to comment.