-
Notifications
You must be signed in to change notification settings - Fork 3
/
YouTubeThumbnail.uno
54 lines (46 loc) · 1018 Bytes
/
YouTubeThumbnail.uno
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using Uno;
using Uno.UX;
using Uno.Collections;
using Fuse;
using Fuse.Controls;
public class YouTubeThumbnail : Panel
{
public YouTubeThumbnail () {
var impl = new YouTubeThumbnailImpl();
Children.Add(impl);
}
string _id_val;
public string Id {
get {
return _id_val;
}
set {
var s = _id_val;
_id_val = value;
OnIdChanged(value, s);
}
}
public string Text { get; set; }
public event ValueChangedHandler<String> IdChanged;
void OnIdChanged(string value, string orig)
{
if (IdChanged != null)
IdChanged(this, new ValueChangedArgs<string>(value, orig));
}
public event ValueChangedHandler<int> StateChanged;
[UXValueChangedEvent("SetState", "StateChanged")]
public int State {
get;
set;
}
public void SetState(int value, object origin)
{
State = value;
OnStateChanged(value, origin);
}
void OnStateChanged(int value, object orig)
{
if (StateChanged != null)
StateChanged(this, new ValueChangedArgs<int>(value, orig));
}
}