public void AddNewList(Jocr.TextBlock blocks, int index) { Index = index; Words.Clear(); for (int i = 0; i < blocks.Text.Count; i++) { Words.Add(new OcrWordsModel(blocks.Text[i])); } }
public OcrWordsViewModel(Jocr.TextBlock blocks, int index) { Index = index; List <OcrWordsModel> entriesModel = new List <OcrWordsModel>(); for (int i = 0; i < blocks.Text.Count; i++) { entriesModel.Add(new OcrWordsModel(blocks.Text[i])); } Words = new ObservableCollection <OcrWordsModel>(entriesModel); }
public void ShowWordsPopup(Jocr.TextBlock block, int index, Button button) { popupScrollViewer.ScrollToTop(); wordsViewModel.AddNewList(block, index); wordPopup.IsOpen = true; }