Skip to content

Commit

Permalink
Fixes wrong location of keytips in backstage when animations are enab…
Browse files Browse the repository at this point in the history
…led #258
  • Loading branch information
batzen committed Feb 5, 2016
1 parent c72c205 commit 7f5228e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions Fluent.Ribbon/Adorners/KeyTipAdorner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,25 +788,17 @@ private void UpdateKeyTipPositions()
elementSize.Height / 2.0 + 2,
elementSize.Height / 2.0 + 2), this.AdornedElement);
}
else if (this.associatedElements[i] is BackstageTabItem)
{
// BackstageButton Exclusive Placement
var keyTipSize = this.keyTips[i].DesiredSize;
var elementSize = this.associatedElements[i].DesiredSize;
this.keyTipPositions[i] = this.associatedElements[i].TranslatePoint(
new Point(
5,
elementSize.Height / 2.0 - keyTipSize.Height), this.AdornedElement);
}
else if (((FrameworkElement)this.associatedElements[i]).Parent is BackstageTabControl)
{
// Backstage Items Exclusive Placement
var keyTipSize = this.keyTips[i].DesiredSize;
var elementSize = this.associatedElements[i].DesiredSize;
this.keyTipPositions[i] = this.associatedElements[i].TranslatePoint(
var parent = (UIElement)((FrameworkElement)this.associatedElements[i]).Parent;
var positionInParent = this.associatedElements[i].TranslatePoint(default(Point), parent);
this.keyTipPositions[i] = parent.TranslatePoint(
new Point(
20,
elementSize.Height / 2.0 - keyTipSize.Height), this.AdornedElement);
5,
positionInParent.Y + (elementSize.Height / 2.0 - keyTipSize.Height)), this.AdornedElement);
}
else
{
Expand Down

0 comments on commit 7f5228e

Please sign in to comment.