now you can use ItemsSource on CoverView (for net>=4.5)

This commit is contained in:
NaBian committed 2019-02-13 17:40:47 +08:00
1 parent b179d90aa1
commit 5f299e988e
19 files changed
+375 -201

No files matched your search

+59
View File
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Net;
using HandyControl.Data;
using HandyControlDemo.Data;
using HandyControlDemo.Tools.Converter;
using Newtonsoft.Json;
@@ -125,5 +127,62 @@ namespace HandyControlDemo.Service
}
};
}
internal ObservableCollection<CoverViewDemoModel> GetCoverViewDemoDataList()
{
return new ObservableCollection<CoverViewDemoModel>
{
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/1.jpg",
BackgroundToken = ResourceToken.SuccessBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/2.jpg",
BackgroundToken = ResourceToken.PrimaryBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/3.jpg",
BackgroundToken = ResourceToken.WarningBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/4.jpg",
BackgroundToken = ResourceToken.DangerBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/5.jpg",
BackgroundToken = ResourceToken.SuccessBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/6.jpg",
BackgroundToken = ResourceToken.PrimaryBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/7.jpg",
BackgroundToken = ResourceToken.InfoBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/8.jpg",
BackgroundToken = ResourceToken.WarningBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/9.jpg",
BackgroundToken = ResourceToken.PrimaryBrush
},
new CoverViewDemoModel
{
ImgPath = "/HandyControlDemo;component/Resources/Img/Album/10.jpg",
BackgroundToken = ResourceToken.DangerBrush
}
};
}
}
}