Guest User

Untitled

a guest
Jan 11th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System.Collections.ObjectModel;
  2. using System.ComponentModel;
  3.  
  4. namespace BlogSamples.ViewModels
  5. {
  6. public class MainPageViewModel : INotifyPropertyChanged
  7. {
  8. //...
  9.  
  10. public ObservableCollection<string> RandomStrings { get; private set; }
  11.  
  12. public string SelectedString
  13. {
  14. // ... property impl not shown for brevity
  15. }
  16.  
  17. public MainPageViewModel()
  18. {
  19. RandomStrings = new ObservableCollection<string>();
  20. for (int i = 65; i < 98; i++)
  21. {
  22. RandomStrings.Add(((char)i).ToString().ToUpper());
  23. }
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment