// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// Interaction logic for MainView.xaml
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
using System.Windows;
using System.Windows.Controls;
///
/// Interaction logic for MainView.xaml
///
public partial class MainView : UserControl
{
///
/// Initializes a new instance of the class.
///
public MainView()
{
this.InitializeComponent();
}
///
/// Hide the overflow control on the Preset panel.
/// TODO find a better way of doing this. This seems to be the common solution.
///
///
/// The sender.
///
///
/// The e.
///
private void ToolBarLoaded(object sender, RoutedEventArgs e)
{
ToolBar toolBar = sender as ToolBar;
if (toolBar != null)
{
var overflowGrid = toolBar.Template.FindName("OverflowGrid", toolBar) as FrameworkElement;
if (overflowGrid != null)
{
overflowGrid.Visibility = Visibility.Collapsed;
}
}
}
}
}