File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
samples/Sample.Uno/Presentation Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 20
20
VerticalAlignment =" Center"
21
21
Spacing =" 16" >
22
22
23
- <TextBlock Text =" {x:Bind ViewModel.OfflineResultText}" />
23
+ <TextBlock Text =" {x:Bind ViewModel.OfflineResultText, Mode=OneWay }" />
24
24
25
- <TextBlock Text =" {x:Bind ViewModel.OfflineDate}" />
25
+ <TextBlock Text =" {x:Bind ViewModel.OfflineDate, Mode=OneWay }" />
26
26
27
27
<Button Content =" Run Offline"
28
28
Command =" {x:Bind ViewModel.OfflineCommand}" />
Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ public partial class MainViewModel(
9
9
INavigator navigator
10
10
) : ObservableObject , IEventHandler < AppEvent >
11
11
{
12
- [ ObservableProperty ] string ? offlineResultText ;
13
- [ ObservableProperty ] string ? offlineDate ;
12
+ [ ObservableProperty ] string offlineResultText = "No Result" ;
13
+ [ ObservableProperty ] string offlineDate = "Not Offline" ;
14
14
15
15
[ RelayCommand ]
16
16
async Task Offline ( )
17
17
{
18
- var context = await mediator . RequestWithContext ( new OfflineRequest ( ) ) ;
18
+ var context = await mediator
19
+ . RequestWithContext ( new OfflineRequest ( ) )
20
+ . ConfigureAwait ( true ) ;
19
21
var offline = context . Context . Offline ( ) ;
20
22
21
23
this . OfflineResultText = context . Result ;
You can’t perform that action at this time.
0 commit comments