I need Regions list on my UI.Here key is the Region. How bind the key on xaml(UI) as listview.
MainViewModel
- public ObservableCollection
ItemDetails { get; set; }
- public class WorkItem
- {
- public string country { get; set; }
- public string capital { get; set; }
- public string Region { get; set; }
- public string S_region { get; set; }
- public double? Area { get; set; }
- public int Population { get; set; }
- }
- var queryRegion = from s in ItemDetails
- group s by s.Region into newGroup
- orderby newGroup.Key
- select newGroup;
-
"Regions: " Foreground="White" FontSize="20" Margin="10,20,0,0" FontWeight="Bold"/> -
"White" Margin="10,70,0,0" FontSize="60" - FontWeight="Bold"
- Foreground="Black" ItemsSource="{Binding queryRegion}"
- VerticalAlignment="Stretch"
- HorizontalAlignment="Stretch"
- IsItemClickEnabled="True"
- ItemClick="ListView_ItemClick">
-
-
-
-
"{Binding queryRegion.Key}" Foreground="Black"/>
Piyush PansuriyaPosted Dec 14, 2018, 1:22 AM
Neethu pradeepPosted Dec 14, 2018, 12:52 AM
Piyush PansuriyaPosted Dec 14, 2018, 12:00 AM