1using System.Globalization;
9 [XamlCompilation(XamlCompilationOptions.Compile)]
18 this.InitializeComponent();
30 internal void AddLegalId(
TokenDetailsViewModel Model,
string Label,
string FriendlyName,
string LegalId)
32 int Row = this.PartsGrid.RowDefinitions.Count;
35 this.PartsGrid.RowDefinitions.Add(
new RowDefinition()
37 Height = GridLength.Auto
40 this.PartsGrid.Add(
new Label()
43 Style = AppStyles.KeyLabel
46 this.PartsGrid.Add(Lbl =
new Label()
49 Style = AppStyles.ClickableValueLabel
52 TapGestureRecognizer Tap =
new();
53 Lbl.GestureRecognizers.Add(Tap);
54 Tap.Command = Model.ViewIdCommand;
55 Tap.CommandParameter = LegalId;
68 internal void AddJid(
TokenDetailsViewModel Model,
string Label,
string Jid,
string LegalId,
string FriendlyName)
70 int Row = this.PartsGrid.RowDefinitions.Count;
73 this.PartsGrid.RowDefinitions.Add(
new RowDefinition()
75 Height = GridLength.Auto
78 this.PartsGrid.Add(
new Label()
81 Style = AppStyles.KeyLabel
84 this.PartsGrid.Add(Lbl =
new Label()
87 Style = AppStyles.ClickableValueLabel
90 TapGestureRecognizer Tap =
new();
91 Lbl.GestureRecognizers.Add(Tap);
92 Tap.Command = Model.OpenChatCommand;
93 Tap.CommandParameter = Jid +
" | " + LegalId +
" | " + FriendlyName;
106 int Row = this.GeneralInfoGrid.RowDefinitions.Count;
109 this.GeneralInfoGrid.RowDefinitions.Add(
new RowDefinition()
111 Height = GridLength.Auto
114 this.GeneralInfoGrid.Add(
new Label()
117 Style = AppStyles.KeyLabel
120 this.GeneralInfoGrid.Add(Lbl =
new Label()
123 Style = AppStyles.ClickableValueLabel
126 TapGestureRecognizer Tap =
new();
127 Lbl.GestureRecognizers.Add(Tap);
128 Tap.Command = Model.OpenLinkCommand;
129 Tap.CommandParameter = LinkUri;
142 int Row = this.GeneralInfoGrid.RowDefinitions.Count;
145 this.GeneralInfoGrid.RowDefinitions.Add(
new RowDefinition()
147 Height = GridLength.Auto
150 this.GeneralInfoGrid.Add(
new Label()
153 Style = AppStyles.KeyLabel
156 this.GeneralInfoGrid.Add(Lbl =
new Label()
159 Style = AppStyles.ValueLabel
162 if (Uri.TryCreate(Value, UriKind.Absolute, out Uri? RefUri) &&
163 RefUri.Scheme.ToLower(CultureInfo.InvariantCulture) is
string s &&
164 (s ==
"http" || s ==
"https"))
166 Lbl.Style = AppStyles.ClickableValueLabel;
168 TapGestureRecognizer Tap =
new();
169 Lbl.GestureRecognizers.Add(Tap);
170 Tap.Command = Model.OpenLinkCommand;
171 Tap.CommandParameter = Value;
Base class that references services in the app.
static IUiService UiService
Service serializing and managing UI-related tasks.
Holds navigation parameters specific to a token.
A page that allows the user to view information about a token.
TokenDetailsPage()
Creates a new instance of the TokenDetailsPage class.
partial class TokenDetailsViewModel(TokenDetailsPage Page, TokenDetailsNavigationArgs? Args)
The view model to bind to for when displaying the contents of a token.