private void OnRadioButtonChecked(object sender, RoutedEventArgs e)
        {
            var radioButton = sender as RadioButton;

            if (radioButton == null)
            {
                return;
            }

            var word = radioButton.DataContext as WordInformationModel;

            if (word == null)
            {
                return;
            }

            WordClicked?.Invoke(word);
        }
Ejemplo n.º 2
0
        private void OnWordPopupButtonClick(object sender, RoutedEventArgs e)
        {
            Button button = sender as Button;

            if (button == null)
            {
                return;
            }

            OcrWordsModel word = button.DataContext as OcrWordsModel;

            if (word == null)
            {
                return;
            }

            wordPopup.IsOpen = false;
            viewModel.ChangeWord(word.Word, wordsViewModel.Index);
            WordClicked?.Invoke(null, null);
        }
        private void OnWordsViewItemClick(object sender, RoutedEventArgs e)
        {
            var element = sender as FrameworkElement;

            if (element == null)
            {
                return;
            }

            var word = element.DataContext as WordInformationModel;

            if (word == null)
            {
                return;
            }

            //If word is selectable then it's handle by a different event
            if (word.IsSelectable)
            {
                return;
            }

            WordClicked?.Invoke(word);
        }