]> granicus.if.org Git - handbrake/commitdiff
WinGui: Cosmetic improvement to the SplitButton Control. It no longer appears for...
authorsr55 <sr55.hb@outlook.com>
Sun, 11 May 2014 12:18:47 +0000 (12:18 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 11 May 2014 12:18:47 +0000 (12:18 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6180 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs

index 46e6626201af5e45e9f8f3a01875ff0064c5bec9..eb8b5df0a70d70e975ecbd887bcd1c9412b53f69 100644 (file)
@@ -128,6 +128,7 @@ namespace HandBrakeWPF.Controls.SplitButton
                 if (this.contextMenu != null)\r
                 {\r
                     // Add the ContextMenu as a logical child (for DataContext and RoutedCommands)\r
+                    this.contextMenu.Visibility = Visibility.Collapsed;\r
                     this.contextMenu.IsOpen = true;\r
                     DependencyObject current = this.contextMenu;\r
                     do\r
@@ -137,11 +138,11 @@ namespace HandBrakeWPF.Controls.SplitButton
                     }\r
                     while (null != current);\r
 \r
-                    this.contextMenu.IsOpen = false;\r
+                    this.contextMenu.IsOpen = false;     \r
                     this.AddLogicalChild(this.logicalChild);\r
 \r
                     this.contextMenu.Opened += this.ContextMenu_Opened;\r
-                    this.contextMenu.Closed += this.ContextMenu_Closed;\r
+                    this.contextMenu.Closed += this.ContextMenu_Closed;              \r
                 }\r
             }\r
         }\r
@@ -197,6 +198,7 @@ namespace HandBrakeWPF.Controls.SplitButton
             {\r
                 this.contextMenu.HorizontalOffset = 0;\r
                 this.contextMenu.VerticalOffset = 0;\r
+                this.contextMenu.Visibility = Visibility.Visible;\r
                 this.contextMenu.IsOpen = true;\r
             }\r
         }\r