// -------------------------------------------------------------------------------------------------------------------- // // 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 AudioView.xaml // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrakeWPF.Views { using System.Windows; using System.Windows.Controls; /// /// Interaction logic for AudioView.xaml /// public partial class AudioView : UserControl { /// /// Initializes a new instance of the class. /// public AudioView() { this.InitializeComponent(); } private void AudioOptionsButton_OnClick(object sender, RoutedEventArgs e) { var button = sender as FrameworkElement; if (button != null && button.ContextMenu != null) { button.ContextMenu.PlacementTarget = button; button.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom; button.ContextMenu.IsOpen = true; } } } }