forked from masterQian/ShowStart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSinger.h
29 lines (24 loc) · 822 Bytes
/
Singer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include "Singer.g.h"
using namespace winrt::Microsoft::UI::Xaml;
namespace winrt::ShowStart::implementation {
struct Singer : SingerT<Singer> {
Singer() = delete;
Singer(hstring const& name, hstring const& avatar) {
mName = name;
mAvatar = avatar;
}
hstring mName;
hstring Name() const { return mName; }
hstring mAvatar;
Media::ImageSource AvatarSource() const {
Media::Imaging::BitmapImage bmp;
bmp.UriSource(Windows::Foundation::Uri(mAvatar));
bmp.CreateOptions(Media::Imaging::BitmapCreateOptions::IgnoreImageCache);
return bmp;
}
};
}
namespace winrt::ShowStart::factory_implementation {
struct Singer : SingerT<Singer, implementation::Singer> { };
}