add ImageAttach
This commit is contained in:
1 parent
8e34fc1d29
commit
d9959fab38
21 files changed
+131
-50
No files matched your search
@@ -7,12 +7,24 @@ namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class ItemsDisplayViewModel : DemoViewModelBase<AvatarModel>
|
||||
{
|
||||
public ItemsDisplayViewModel(Func<List<AvatarModel>> getDatAction)
|
||||
public ItemsDisplayViewModel(Func<List<AvatarModel>> getDataAction)
|
||||
{
|
||||
#if NET40
|
||||
Task.Factory.StartNew(() => DataList = getDatAction?.Invoke());
|
||||
#if !NET40
|
||||
Task.Factory.StartNew(() => DataList = getDataAction?.Invoke()).ContinueWith(obj => DataGot = true);
|
||||
#else
|
||||
Task.Run(() => DataList = getDatAction?.Invoke());
|
||||
Task.Run(() => DataList = getDataAction?.Invoke()).ContinueWith(obj => DataGot = true);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool _dataGot;
|
||||
|
||||
public bool DataGot
|
||||
{
|
||||
get => _dataGot;
|
||||
#if NET40
|
||||
set => Set(nameof(DataGot), ref _dataGot, value);
|
||||
#else
|
||||
set => Set(ref _dataGot, value);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user