diff --git a/gui/OpenFaceOffline/MainWindow.xaml.cs b/gui/OpenFaceOffline/MainWindow.xaml.cs index 612a8160..ed9eb71d 100644 --- a/gui/OpenFaceOffline/MainWindow.xaml.cs +++ b/gui/OpenFaceOffline/MainWindow.xaml.cs @@ -40,7 +40,6 @@ using System.Windows; using System.Windows.Threading; using System.Windows.Media.Imaging; using System.Windows.Controls; -using System.Windows.Interactivity; using Microsoft.WindowsAPICodePack.Dialogs; // Internal libraries diff --git a/gui/OpenFaceOffline/OpenFaceOffline.csproj b/gui/OpenFaceOffline/OpenFaceOffline.csproj index f89bcb15..779645de 100644 --- a/gui/OpenFaceOffline/OpenFaceOffline.csproj +++ b/gui/OpenFaceOffline/OpenFaceOffline.csproj @@ -69,7 +69,6 @@ - @@ -101,7 +100,6 @@ CameraSelection.xaml - MultiBarGraph.xaml diff --git a/gui/OpenFaceOffline/UI_items/ExclusiveMenuItemBehavior.cs b/gui/OpenFaceOffline/UI_items/ExclusiveMenuItemBehavior.cs deleted file mode 100644 index 03bda393..00000000 --- a/gui/OpenFaceOffline/UI_items/ExclusiveMenuItemBehavior.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Interactivity; - -namespace OpenFaceOffline -{ - public class ExclusiveMenuItemBehavior : Behavior - { - protected override void OnAttached() - { - base.OnAttached(); - - GetCheckableSubMenuItems(AssociatedObject) - .ToList() - .ForEach(item => item.Click += OnClick); - } - - protected override void OnDetaching() - { - base.OnDetaching(); - - GetCheckableSubMenuItems(AssociatedObject) - .ToList() - .ForEach(item => item.Click -= OnClick); - } - - private static IEnumerable GetCheckableSubMenuItems(ItemsControl menuItem) - { - var itemCollection = menuItem.Items; - return itemCollection.OfType().Where(menuItemCandidate => menuItemCandidate.IsCheckable); - } - - private void OnClick(object sender, RoutedEventArgs routedEventArgs) - { - var menuItem = (MenuItem)sender; - - if (!menuItem.IsChecked) - { - menuItem.IsChecked = true; - return; - } - - GetCheckableSubMenuItems(AssociatedObject) - .Where(item => item != menuItem) - .ToList() - .ForEach(item => item.IsChecked = false); - } - } -}