File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
src/DevTKSS.Uno.XamlNavigationApp-1/Presentation Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,20 @@ public DashboardModel()
55 {
66
77 }
8+ private async ValueTask < IImmutableList < string > > GetMembers ( CancellationToken ct ) => _listMembers ;
9+
10+ private readonly IImmutableList < string > _listMembers = ImmutableList . Create (
11+ [
12+ "Hans" ,
13+ "Lisa" ,
14+ "Anke" ,
15+ "Tom"
16+ ] ) ;
17+
818 public IState < string > DashboardTitle => State < string > . Value ( this , ( ) => "Hallo vom Dashboard" ) ;
19+
20+ public IListState < string > DashboardList => ListState . Async ( this , GetMembers )
21+ . Selection ( SelectedMember ) ;
22+
23+ public IState < string > SelectedMember => State < string > . Empty ( this ) ;
924}
Original file line number Diff line number Diff line change 66 xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
77 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
88 xmlns : utu =" using:Uno.Toolkit.UI"
9+ xmlns : mvux =" using:Uno.Extensions.Reactive.UI"
910 mc : Ignorable =" d"
1011 Background =" {ThemeResource BackgroundBrush}" >
1112
12- <Grid utu:SafeArea.Insets=" VisibleBounds" >
13+ <Grid RowSpacing =" 10" Padding =" 15"
14+ utu:SafeArea.Insets=" VisibleBounds" >
15+ <Grid .RowDefinitions>
16+ <RowDefinition Height =" Auto" />
17+ <RowDefinition Height =" Auto" />
18+ <RowDefinition Height =" *" />
19+ </Grid .RowDefinitions>
1320 <TextBlock Text =" {Binding DashboardTitle}"
1421 HorizontalTextAlignment =" Center"
1522 VerticalAlignment =" Center" />
23+
24+ <TextBlock Grid.Row=" 1"
25+ HorizontalAlignment =" Center"
26+ TextAlignment =" Center" >
27+ <Run Text =" Selected Name:" /> <Run Text =" {Binding SelectedMember}" />
28+ </TextBlock >
29+
30+ <ListView Grid.Row=" 2"
31+ ItemsSource =" {Binding DashboardList}" />
32+
1633 </Grid >
17- </Page >
34+ </Page >
You can’t perform that action at this time.
0 commit comments