forked from files-community/Files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBundles.xaml.cs
39 lines (30 loc) · 969 Bytes
/
Bundles.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
using System;
using Windows.UI.Xaml.Controls;
using Files.ViewModels.Widgets.Bundles;
using Files.ViewModels.Widgets;
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
namespace Files.UserControls.Widgets
{
public sealed partial class Bundles : UserControl, IWidgetItemModel, IDisposable
{
public BundlesViewModel ViewModel
{
get => (BundlesViewModel)DataContext;
private set => DataContext = value;
}
public string WidgetName => nameof(Bundles);
public Bundles()
{
this.InitializeComponent();
this.ViewModel = new BundlesViewModel();
}
#region IDisposable
public void Dispose()
{
// We need dispose to unhook events to avoid memory leaks
this.ViewModel?.Dispose();
this.ViewModel = null;
}
#endregion IDisposable
}
}