private void CommandBinding_Executed_Delete(object sender, ExecutedRoutedEventArgs e)
        {
            ManagementViewModel vm = this.DataContext as ManagementViewModel;

            MACFilterInformation selectedMACFilter = (e.OriginalSource as DataGridRow).DataContext as MACFilterInformation;

            vm.DeleteMACFilterInfo(selectedMACFilter);
        }
        private void DataGridRow_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ManagementViewModel vm = this.DataContext as ManagementViewModel;

            MACFilterInformation selectedMACFilter = (e.Source as DataGridRow).DataContext as MACFilterInformation;

            vm.ShowMACFilterInfo(selectedMACFilter);
        }
 private void CommandBinding_CanExecute_Ok(object sender, CanExecuteRoutedEventArgs e)
 {
     if (IsInitialized)
     {
         MACFilterInformation info = DataContext as MACFilterInformation;
         if (info != null)
         {
             e.CanExecute = !string.IsNullOrEmpty(info.MACAddress);
         }
     }
 }