-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTileListView.xaml.cs
714 lines (628 loc) · 23.2 KB
/
TileListView.xaml.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Animation;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Trivial.Data;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Text;
namespace Trivial.UI;
using DependencyObjectProxy = DependencyObjectProxy<TileListView>;
/// <summary>
/// The horizontal tile collection control.
/// </summary>
public sealed partial class TileListView : UserControl
{
/// <summary>
/// The dependency property of item style.
/// </summary>
public static readonly DependencyProperty ItemStyleProperty = DependencyObjectProxy.RegisterProperty<Style>(nameof(ItemStyle), OnItemStyleChanged);
/// <summary>
/// The dependency property of list view item style.
/// </summary>
public static readonly DependencyProperty ItemContainerStyleProperty = DependencyObjectProxy.RegisterProperty<Style>(nameof(ItemContainerStyle), (c, e, p) => c.ItemContainerStyle = e.NewValue);
/// <summary>
/// The dependency property of selection mode.
/// </summary>
public static readonly DependencyProperty SelectionModeProperty = DependencyObjectProxy.RegisterProperty(nameof(SelectionMode), ListViewSelectionMode.None);
/// <summary>
/// The dependency property of header height.
/// </summary>
public static readonly DependencyProperty HeaderHeightProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(HeaderHeight), (c, e, p) => c.HeaderHeight = e.NewValue);
/// <summary>
/// The dependency property of header font size.
/// </summary>
public static readonly DependencyProperty HeaderFontSizeProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(HeaderFontSize), (c, e, p) => c.HeaderFontSize = e.NewValue, 12);
/// <summary>
/// The dependency property of header font weight.
/// </summary>
public static readonly DependencyProperty HeaderFontWeightProperty = DependencyObjectProxy.RegisterFontWeightProperty(nameof(HeaderFontWeight), (c, e, p) => c.HeaderFontWeight = e.NewValue);
/// <summary>
/// The dependency property of header font style.
/// </summary>
public static readonly DependencyProperty HeaderFontStyleProperty = DependencyObjectProxy.RegisterProperty<FontStyle>(nameof(HeaderFontStyle), (c, e, p) => c.HeaderFontStyle = e.NewValue);
/// <summary>
/// The dependency property of header foreground.
/// </summary>
public static readonly DependencyProperty HeaderForegroundProperty = DependencyObjectProxy.RegisterProperty<Brush>(nameof(HeaderForeground), (c, e, p) => c.HeaderForeground = e.NewValue);
/// <summary>
/// The dependency property of header background.
/// </summary>
public static readonly DependencyProperty HeaderBackgroundProperty = DependencyObjectProxy.RegisterProperty<Brush>(nameof(HeaderBackground), (c, e, p) => c.HeaderBackground = e.NewValue);
/// <summary>
/// The dependency property of header background sizing.
/// </summary>
public static readonly DependencyProperty HeaderBackgroundSizingProperty = DependencyObjectProxy.RegisterProperty<BackgroundSizing>(nameof(HeaderBackgroundSizing), (c, e, p) => c.HeaderBackgroundSizing = e.NewValue);
/// <summary>
/// The dependency property of header padding.
/// </summary>
public static readonly DependencyProperty HeaderPaddingProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(HeaderPadding), (c, e, p) => c.HeaderPadding = e.NewValue);
/// <summary>
/// The dependency property of header margin.
/// </summary>
public static readonly DependencyProperty HeaderMarginProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(HeaderMargin), (c, e, p) => c.HeaderMargin = e.NewValue);
/// <summary>
/// The dependency property of header border thickness.
/// </summary>
public static readonly DependencyProperty HeaderBorderThicknessProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(HeaderBorderThickness), (c, e, p) => c.HeaderBorderThickness = e.NewValue);
/// <summary>
/// The dependency property of header border brush.
/// </summary>
public static readonly DependencyProperty HeaderBorderBrushProperty = DependencyObjectProxy.RegisterProperty<Brush>(nameof(HeaderBorderBrush), (c, e, p) => c.HeaderBorderBrush = e.NewValue);
/// <summary>
/// The dependency property of header corner radius.
/// </summary>
public static readonly DependencyProperty HeaderCornerRadiusProperty = DependencyObjectProxy.RegisterProperty<CornerRadius>(nameof(HeaderCornerRadius), (c, e, p) => c.HeaderCornerRadius = e.NewValue);
/// <summary>
/// The dependency property of header left margin.
/// </summary>
public static readonly DependencyProperty HeaderLeftMarginProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(HeaderLeftMargin), (c, e, p) => c.HeaderLeftMargin = e.NewValue);
/// <summary>
/// The dependency property of header right margin.
/// </summary>
public static readonly DependencyProperty HeaderRightMarginProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(HeaderRightMargin), (c, e, p) => c.HeaderRightMargin = e.NewValue);
/// <summary>
/// The dependency property of title.
/// </summary>
public static readonly DependencyProperty TitleProperty = DependencyObjectProxy.RegisterProperty<string>(nameof(Title), (c, e, p) => c.Title = e.NewValue);
/// <summary>
/// The dependency property of title font size.
/// </summary>
public static readonly DependencyProperty TitleFontSizeProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(TitleFontSize), (c, e, p) => c.TitleFontSize = e.NewValue, 18);
/// <summary>
/// The dependency property of title font weight.
/// </summary>
public static readonly DependencyProperty TitleFontWeightProperty = DependencyObjectProxy.RegisterFontWeightProperty(nameof(TitleFontWeight), (c, e, p) => c.TitleFontWeight = e.NewValue);
/// <summary>
/// The dependency property of title font style.
/// </summary>
public static readonly DependencyProperty TitleFontStyleProperty = DependencyObjectProxy.RegisterProperty<FontStyle>(nameof(TitleFontStyle), (c, e, p) => c.TitleFontStyle = e.NewValue);
/// <summary>
/// The dependency property of title line height.
/// </summary>
public static readonly DependencyProperty TitleLineHeightProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(TitleLineHeight), (c, e, p) => c.TitleLineHeight = e.NewValue);
/// <summary>
/// The dependency property of title foreground.
/// </summary>
public static readonly DependencyProperty TitleForegroundProperty = DependencyObjectProxy.RegisterProperty<Brush>(nameof(TitleForeground), (c, e, p) => c.TitleForeground = e.NewValue);
/// <summary>
/// The dependency property of icon stretch.
/// </summary>
public static readonly DependencyProperty IconStretchProperty = DependencyObjectProxy.RegisterProperty<Stretch>(nameof(IconStretch), (c, e, p) => c.IconStretch = e.NewValue);
/// <summary>
/// The dependency property of icon URI.
/// </summary>
public static readonly DependencyProperty IconUriProperty = DependencyObjectProxy.RegisterProperty<Uri>(nameof(IconUri), (c, e, p) => c.IconUri = e.NewValue);
/// <summary>
/// The dependency property of icon width.
/// </summary>
public static readonly DependencyProperty IconWidthProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(IconWidth), (c, e, p) => c.IconWidth = e.NewValue);
/// <summary>
/// The dependency property of icon height.
/// </summary>
public static readonly DependencyProperty IconHeightProperty = DependencyObjectProxy.RegisterDoubleProperty(nameof(IconHeight), (c, e, p) => c.IconHeight = e.NewValue);
/// <summary>
/// The dependency property of icon margin.
/// </summary>
public static readonly DependencyProperty IconMarginProperty = DependencyObjectProxy.RegisterProperty<Thickness>(nameof(IconMargin), (c, e, p) => c.IconMargin = e.NewValue);
/// <summary>
/// The dependency property of icon corner radius.
/// </summary>
public static readonly DependencyProperty IconCornerRadiusProperty = DependencyObjectProxy.RegisterProperty<CornerRadius>(nameof(IconCornerRadius), (c, e, p) => c.IconCornerRadius = e.NewValue);
/// <summary>
/// The dependency property of the item space in list.
/// </summary>
public static readonly DependencyProperty ListItemSpacingProperty = DependencyObjectProxy.RegisterProperty(nameof(ListItemSpacing), 0d);
/// <summary>
/// Initializes a new instance of the TileListView class.
/// </summary>
public TileListView()
{
InitializeComponent();
}
/// <summary>
/// Occurs when the currently selected item changes.
/// </summary>
public event SelectionChangedEventHandler SelectionChanged;
/// <summary>
/// Gets the children.
/// </summary>
public ItemCollection Items => ListPanel.Items;
/// <summary>
/// Gets or sets the style of tile item.
/// </summary>
public Style ItemStyle
{
get => (Style)GetValue(ItemStyleProperty);
set => SetValue(ItemStyleProperty, value);
}
/// <summary>
/// Gets or sets the style of internal list view.
/// </summary>
public Style ItemContainerStyle
{
get => ListPanel.ItemContainerStyle;
set => ListPanel.ItemContainerStyle = value;
}
/// <summary>
/// Gets or sets the selection mode.
/// </summary>
public ListViewSelectionMode SelectionMode
{
get => (ListViewSelectionMode)GetValue(SelectionModeProperty);
set => SetValue(SelectionModeProperty, value);
}
/// <summary>
/// Gets or sets the selected index.
/// </summary>
public int SelectedIndex
{
get => ListPanel.SelectedIndex;
set => ListPanel.SelectedIndex = value;
}
/// <summary>
/// Gets or sets the selected item.
/// </summary>
public TileItem SelectedItem
{
get => ListPanel.SelectedItem as TileItem;
set => ListPanel.SelectedItem = value;
}
/// <summary>
/// Gets or sets the template of internal list view.
/// </summary>
public ControlTemplate ListViewDataTemplate
{
get => ListPanel.Template;
set => ListPanel.Template = value;
}
/// <summary>
/// Gets or sets the font size of header.
/// </summary>
public double HeaderFontSize
{
get => HeaderElement.FontSize;
set => HeaderElement.FontSize = value;
}
/// <summary>
/// Gets or sets the font weight of header.
/// </summary>
public FontWeight HeaderFontWeight
{
get => HeaderElement.FontWeight;
set => HeaderElement.FontWeight = value;
}
/// <summary>
/// Gets or sets the font style of header.
/// </summary>
public FontStyle HeaderFontStyle
{
get => HeaderElement.FontStyle;
set => HeaderElement.FontStyle = value;
}
/// <summary>
/// Gets or sets the height of header.
/// </summary>
public double HeaderHeight
{
get => HeaderElement.Height;
set => HeaderElement.Height = value;
}
/// <summary>
/// Gets or sets the foreground of header.
/// </summary>
public Brush HeaderForeground
{
get => HeaderElement.Foreground;
set => HeaderElement.Foreground = value;
}
/// <summary>
/// Gets or sets the background of header.
/// </summary>
public Brush HeaderBackground
{
get => HeaderElement.Background;
set => HeaderElement.Background = value;
}
/// <summary>
/// Gets or sets the background sizing of header.
/// </summary>
public BackgroundSizing HeaderBackgroundSizing
{
get => HeaderElement.BackgroundSizing;
set => HeaderElement.BackgroundSizing = value;
}
/// <summary>
/// Gets or sets the padding of header.
/// </summary>
public Thickness HeaderPadding
{
get => HeaderElement.Padding;
set => HeaderElement.Padding = value;
}
/// <summary>
/// Gets or sets the margin of header.
/// </summary>
public Thickness HeaderMargin
{
get => HeaderElement.Margin;
set => HeaderElement.Margin = value;
}
/// <summary>
/// Gets or sets the border thickness of header.
/// </summary>
public Thickness HeaderBorderThickness
{
get => HeaderElement.BorderThickness;
set => HeaderElement.BorderThickness = value;
}
/// <summary>
/// Gets or sets the border brush of header.
/// </summary>
public Brush HeaderBorderBrush
{
get => HeaderElement.BorderBrush;
set => HeaderElement.BorderBrush = value;
}
/// <summary>
/// Gets or sets the corner radius of header.
/// </summary>
public CornerRadius HeaderCornerRadius
{
get => HeaderElement.CornerRadius;
set => HeaderElement.CornerRadius = value;
}
/// <summary>
/// Gets or sets the margin of header left zone.
/// </summary>
public Thickness HeaderLeftMargin
{
get => HeaderElement.LeftMargin;
set => HeaderElement.LeftMargin = value;
}
/// <summary>
/// Gets or sets the margin of header right zone.
/// </summary>
public Thickness HeaderRightMargin
{
get => HeaderElement.RightMargin;
set => HeaderElement.RightMargin = value;
}
/// <summary>
/// Gets or sets the title.
/// </summary>
public string Title
{
get => HeaderElement.Title;
set => HeaderElement.Title = value;
}
/// <summary>
/// Gets or sets the font size of title.
/// </summary>
public double TitleFontSize
{
get => HeaderElement.TitleFontSize;
set => HeaderElement.TitleFontSize = value;
}
/// <summary>
/// Gets or sets the font weight of title.
/// </summary>
public FontWeight TitleFontWeight
{
get => HeaderElement.TitleFontWeight;
set => HeaderElement.TitleFontWeight = value;
}
/// <summary>
/// Gets or sets the font style of title.
/// </summary>
public FontStyle TitleFontStyle
{
get => HeaderElement.TitleFontStyle;
set => HeaderElement.TitleFontStyle = value;
}
/// <summary>
/// Gets or sets the line height of title.
/// </summary>
public double TitleLineHeight
{
get => HeaderElement.TitleLineHeight;
set => HeaderElement.TitleLineHeight = value;
}
/// <summary>
/// Gets or sets the foreground of title.
/// </summary>
public Brush TitleForeground
{
get => HeaderElement.TitleForeground;
set => HeaderElement.TitleForeground = value;
}
/// <summary>
/// Gets or sets the icon URI.
/// </summary>
public Uri IconUri
{
get => HeaderElement.IconUri;
set => HeaderElement.IconUri = value;
}
/// <summary>
/// Gets or sets the stretch of icon.
/// </summary>
public Stretch IconStretch
{
get => HeaderElement.IconStretch;
set => HeaderElement.IconStretch = value;
}
/// <summary>
/// Gets or sets the width of icon.
/// </summary>
public double IconWidth
{
get => HeaderElement.IconWidth;
set => HeaderElement.IconWidth = value;
}
/// <summary>
/// Gets or sets the height of icon.
/// </summary>
public double IconHeight
{
get => HeaderElement.IconHeight;
set => HeaderElement.IconHeight = value;
}
/// <summary>
/// Gets or sets the height of icon.
/// </summary>
public double ListItemSpacing
{
get => (double)GetValue(ListItemSpacingProperty);
set => SetValue(ListItemSpacingProperty, value);
}
/// <summary>
/// Gets or sets the margin of icon.
/// </summary>
public Thickness IconMargin
{
get => HeaderElement.IconMargin;
set => HeaderElement.IconMargin = value;
}
/// <summary>
/// Gets or sets the corner radius of icon.
/// </summary>
public CornerRadius IconCornerRadius
{
get => HeaderElement.IconCornerRadius;
set => HeaderElement.IconCornerRadius = value;
}
/// <summary>
/// Gets or sets the content of top customized zone.
/// </summary>
public UIElement TopContent
{
get => Top.Child;
set => Top.Child = value;
}
/// <summary>
/// Gets or sets the content of middle customized zone.
/// </summary>
public UIElement MiddleContent
{
get => Middle.Child;
set => Middle.Child = value;
}
/// <summary>
/// Gets or sets the content of bottom customized zone.
/// </summary>
public UIElement BottomContent
{
get => Bottom.Child;
set => Bottom.Child = value;
}
/// <summary>
/// Gets or sets the content of header cover zone.
/// </summary>
public UIElement HeaderCoverContent
{
get => HeaderElement.CoverContent;
set => HeaderElement.CoverContent = value;
}
/// <summary>
/// Gets or sets the content of header background zone.
/// </summary>
public UIElement HeaderBackgroundContent
{
get => HeaderElement.BackgroundContent;
set => HeaderElement.BackgroundContent = value;
}
/// <summary>
/// Gets or sets the content of customized zone before title in header.
/// </summary>
public UIElement BeforeTitleContent
{
get => HeaderElement.BeforeContent;
set => HeaderElement.BeforeContent = value;
}
/// <summary>
/// Gets or sets the content of customized zone after title in header.
/// </summary>
public UIElement AfterTitleContent
{
get => HeaderElement.AfterContent;
set => HeaderElement.AfterContent = value;
}
/// <summary>
/// Gets or sets the children of customized zone in header right side.
/// </summary>
public UIElementCollection TitleRightSideChildren => HeaderElement.RightChildren;
/// <summary>
/// Adds a new tile item.
/// </summary>
/// <returns>The tile item created to add.</returns>
public TileItem AddItem()
{
var item = new TileItem
{
Style = ItemStyle
};
ListPanel.Items.Add(item);
return item;
}
/// <summary>
/// Adds a new tile item.
/// </summary>
/// <param name="fillProperties">The callback to fill properties.</param>
/// <returns>The tile item created to add.</returns>
public TileItem AddItem(Action<TileItem> fillProperties)
{
var item = new TileItem
{
Style = ItemStyle
};
fillProperties?.Invoke(item);
ListPanel.Items.Add(item);
return item;
}
/// <summary>
/// Adds a new tile item.
/// </summary>
/// <param name="model">The model.</param>
/// <param name="click">The event handler on item click.</param>
/// <returns>The tile item created to add.</returns>
public TileItem AddItem(BaseItemModel model, RoutedEventHandler click = null)
{
var item = model == null ? new TileItem() : TileItem.Create(model);
if (click != null) item.Click += click;
item.Style = ItemStyle;
ListPanel.Items.Add(item);
return item;
}
/// <summary>
/// Adds a new tile item.
/// </summary>
/// <param name="title">The title.</param>
/// <param name="image">The image URI.</param>
/// <param name="description">The description</param>
/// <param name="click">The event handler on item click.</param>
/// <returns>The tile item created to add.</returns>
public TileItem AddItem(string title, Uri image, string description = null, RoutedEventHandler click = null)
{
var item = new TileItem
{
Title = title,
ImageUri = image,
Description = description,
DataContext = new BaseItemModel
{
Name = title,
ImageUri = image,
Description = description
}
};
if (click != null) item.Click += click;
item.Style = ItemStyle;
ListPanel.Items.Add(item);
return item;
}
/// <summary>
/// Adds a new tile item.
/// </summary>
/// <param name="title">The title.</param>
/// <param name="image">The image URI.</param>
/// <param name="imagePrepareOnly">true if the image URI is only for preparing to set but not take effect immediately; otherwise, false.</param>
/// <param name="description">The description</param>
/// <param name="click">The event handler on item click.</param>
/// <returns>The tile item created to add.</returns>
public TileItem AddItem(string title, Uri image, bool imagePrepareOnly, string description = null, RoutedEventHandler click = null)
{
var item = new TileItem
{
Title = title,
Description = description,
DataContext = new BaseItemModel
{
Name = title,
ImageUri = image,
Description = description
}
};
if (click != null) item.Click += click;
item.Style = ItemStyle;
item.SetImage(image, imagePrepareOnly);
ListPanel.Items.Add(item);
return item;
}
/// <summary>
/// Lists all tile items.
/// </summary>
/// <returns>A collection of tile items.</returns>
public IEnumerable<TileItem> GetAllTiles()
{
foreach (var item in ListPanel.Items)
{
if (item is TileItem t) yield return t;
}
}
/// <summary>
/// Uses prepare image URI if available.
/// </summary>
public void UsePrepareImageUri()
{
foreach (var item in ListPanel.Items)
{
if (item is TileItem t) t.UseImageUriPrepared();
}
}
/// <summary>
/// Scrolls the list to bring the specified item into view.
/// </summary>
/// <param name="item">The item to scroll into view.</param>
/// <param name="aligment">The alignment.</param>
public void ScrollIntoView(TileItem item, ScrollIntoViewAlignment aligment = ScrollIntoViewAlignment.Default)
=> ListPanel.ScrollIntoView(item, aligment);
private static void OnItemStyleChanged(TileListView c, ChangeEventArgs<Style> e, DependencyProperty p)
{
foreach (var item in c.ListPanel.Items)
{
if (item is not TileItem ti) continue;
ti.Style = e.NewValue;
}
}
/// <summary>
/// Occurs on container content changing.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="args">The event arguments.</param>
public static void OnContainerContentChanging(object sender, ContainerContentChangingEventArgs args)
{
if (args?.Item is TileListView c) c.UsePrepareImageUri();
}
private void ListPanel_SelectionChanged(object sender, SelectionChangedEventArgs e)
=> SelectionChanged?.Invoke(this, e);
}