Author Topic: WDE - update text in notepad  (Read 2237 times)

Offline bharath

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
WDE - update text in notepad
« on: December 05, 2017, 07:44:49 AM »
Hi,
Can any one help how to update the text in notepad (using notepadviewmodel).

thanks in advance.

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: WDE - update text in notepad
« Reply #1 on: December 06, 2017, 10:25:40 AM »
Hi,

Depending on how and where you want to update the text in Notepad the best place to start would be to get the interaction and then use the code below:

[code]                            INotepadViewModel notepadViewModel = inter.UserData.TryGetValue("NotepadViewModel") as INotepadViewModel;
                            if (notepadViewModel != null)
                            {
                                notepadViewModel.Text = "My Text";
                            }[/code]