HandBrake/win/CS/HandBrakeWPF/Views/AudioView.xaml.cs

40 lines
1.5 KiB
C#

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AudioView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// Interaction logic for AudioView.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
using System.Windows;
using System.Windows.Controls;
/// <summary>
/// Interaction logic for AudioView.xaml
/// </summary>
public partial class AudioView : UserControl
{
/// <summary>
/// Initializes a new instance of the <see cref="AudioView"/> class.
/// </summary>
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;
}
}
}
}