-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
AppLinkEntry.cs
88 lines (73 loc) · 3.62 KB
/
AppLinkEntry.cs
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#nullable disable
using System;
using System.Collections.Generic;
namespace Microsoft.Maui.Controls
{
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="Type[@FullName='Microsoft.Maui.Controls.AppLinkEntry']/Docs/*" />
public class AppLinkEntry : Element, IAppLinkEntry
{
readonly Dictionary<string, string> keyValues;
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
public AppLinkEntry()
{
keyValues = new(StringComparer.Ordinal);
}
/// <summary>Bindable property for <see cref="Title"/>.</summary>
public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(AppLinkEntry), default(string));
/// <summary>Bindable property for <see cref="Description"/>.</summary>
public static readonly BindableProperty DescriptionProperty = BindableProperty.Create(nameof(Description), typeof(string), typeof(AppLinkEntry), default(string));
/// <summary>Bindable property for <see cref="Thumbnail"/>.</summary>
public static readonly BindableProperty ThumbnailProperty = BindableProperty.Create(nameof(Thumbnail), typeof(ImageSource), typeof(AppLinkEntry), default(ImageSource));
/// <summary>Bindable property for <see cref="AppLinkUri"/>.</summary>
public static readonly BindableProperty AppLinkUriProperty = BindableProperty.Create(nameof(AppLinkUri), typeof(Uri), typeof(AppLinkEntry), null);
/// <summary>Bindable property for <see cref="IsLinkActive"/>.</summary>
public static readonly BindableProperty IsLinkActiveProperty = BindableProperty.Create(nameof(IsLinkActive), typeof(bool), typeof(AppLinkEntry), false);
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='AppLinkUri']/Docs/*" />
public Uri AppLinkUri
{
get { return (Uri)GetValue(AppLinkUriProperty); }
set { SetValue(AppLinkUriProperty, value); }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Description']/Docs/*" />
public string Description
{
get { return (string)GetValue(DescriptionProperty); }
set { SetValue(DescriptionProperty, value); }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='IsLinkActive']/Docs/*" />
public bool IsLinkActive
{
get { return (bool)GetValue(IsLinkActiveProperty); }
set { SetValue(IsLinkActiveProperty, value); }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='KeyValues']/Docs/*" />
public IDictionary<string, string> KeyValues
{
get { return keyValues; }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Thumbnail']/Docs/*" />
public ImageSource Thumbnail
{
get { return (ImageSource)GetValue(ThumbnailProperty); }
set { SetValue(ThumbnailProperty, value); }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Title']/Docs/*" />
public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='FromUri']/Docs/*" />
public static AppLinkEntry FromUri(Uri uri)
{
var appEntry = new AppLinkEntry();
appEntry.AppLinkUri = uri;
return appEntry;
}
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='ToString']/Docs/*" />
public override string ToString()
{
return AppLinkUri.ToString();
}
}
}