summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-05-11 12:18:47 +0000
committersr55 <[email protected]>2014-05-11 12:18:47 +0000
commit04cf20ef75e90d40d0d67487fa79e77f375c8482 (patch)
treede8c8f193eaf7dc5a0275c04d67cce049ed6eab7 /win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
parente6e2ebf3e7c9ee5ab9e13e9d2a943b8ba03dcdfd (diff)
WinGui: Cosmetic improvement to the SplitButton Control. It no longer appears for a split second when the control initialises.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6180 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs')
-rw-r--r--win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs b/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
index 46e662620..eb8b5df0a 100644
--- a/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
+++ b/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
@@ -128,6 +128,7 @@ namespace HandBrakeWPF.Controls.SplitButton
if (this.contextMenu != null)
{
// Add the ContextMenu as a logical child (for DataContext and RoutedCommands)
+ this.contextMenu.Visibility = Visibility.Collapsed;
this.contextMenu.IsOpen = true;
DependencyObject current = this.contextMenu;
do
@@ -137,11 +138,11 @@ namespace HandBrakeWPF.Controls.SplitButton
}
while (null != current);
- this.contextMenu.IsOpen = false;
+ this.contextMenu.IsOpen = false;
this.AddLogicalChild(this.logicalChild);
this.contextMenu.Opened += this.ContextMenu_Opened;
- this.contextMenu.Closed += this.ContextMenu_Closed;
+ this.contextMenu.Closed += this.ContextMenu_Closed;
}
}
}
@@ -197,6 +198,7 @@ namespace HandBrakeWPF.Controls.SplitButton
{
this.contextMenu.HorizontalOffset = 0;
this.contextMenu.VerticalOffset = 0;
+ this.contextMenu.Visibility = Visibility.Visible;
this.contextMenu.IsOpen = true;
}
}