-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml.cs
199 lines (157 loc) · 7.52 KB
/
MainWindow.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
using Spotify.Models;
using Spotify.ViewModels;
using Spotify.ViewModels.Pages;
using Spotify.Views.Pages;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Spotify
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public class ViewPage : DependencyObject
{
public bool PrevClick
{
get { return (bool)GetValue(PrevClickProperty); }
set { SetValue(PrevClickProperty, value); }
}
// Using a DependencyProperty as the backing store for PrevClick. This enables animation, styling, binding, etc...
public static readonly DependencyProperty PrevClickProperty =
DependencyProperty.Register("PrevClick", typeof(bool), typeof(ViewPage), new PropertyMetadata(false));
public ObservableCollection<Song> LikeSongSource
{
get { return (ObservableCollection<Song>)GetValue(LikeSongSourceProperty); }
set { SetValue(LikeSongSourceProperty, value); }
}
// Using a DependencyProperty as the backing store for LikeSongSource. This enables animation, styling, binding, etc...
public static readonly DependencyProperty LikeSongSourceProperty =
DependencyProperty.Register("LikeSongSource", typeof(ObservableCollection<Song>), typeof(ViewPage), new PropertyMetadata(null));
public bool IsSearchView
{
get { return (bool)GetValue(IsSearchViewProperty); }
set { SetValue(IsSearchViewProperty, value); }
}
// Using a DependencyProperty as the backing store for IsSearchView. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsSearchViewProperty =
DependencyProperty.Register("IsSearchView", typeof(bool), typeof(ViewPage), new PropertyMetadata(false));
public object CurrentView
{
get { return (object)GetValue(CurrentViewProperty); }
set
{
SetValue(CurrentViewProperty, value);
}
}
public bool IsDisableBack
{
get { return (bool)GetValue(IsDisableBackProperty); }
set
{
SetValue(IsDisableBackProperty, value);
}
}
// Using a DependencyProperty as the backing store for IsDisable. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsDisableBackProperty =
DependencyProperty.Register("IsDisableBack", typeof(bool), typeof(ViewPage), new PropertyMetadata(true));
public bool IsDisableNext
{
get { return (bool)GetValue(IsDisableNextProperty); }
set
{
SetValue(IsDisableNextProperty, value);
}
}
// Using a DependencyProperty as the backing store for IsDisable. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsDisableNextProperty =
DependencyProperty.Register("IsDisableNext", typeof(bool), typeof(ViewPage), new PropertyMetadata(true));
// Using a DependencyProperty as the backing store for CurrentView. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CurrentViewProperty =
DependencyProperty.Register("CurrentView", typeof(object), typeof(ViewPage), new PropertyMetadata(0));
public List<object> ListPage
{
get { return (List<object>)GetValue(ListPageProperty); }
set { SetValue(ListPageProperty, value); }
}
// Using a DependencyProperty as the backing store for ListPage. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ListPageProperty =
DependencyProperty.Register("ListPage", typeof(List<object>), typeof(ViewPage), new PropertyMetadata(new List<object> { }));
public string ViewPageSelected
{
get { return (string)GetValue(ViewPageSelectedProperty); }
set
{
SetValue(ViewPageSelectedProperty, value);
}
}
// Using a DependencyProperty as the backing store for ViewPageSelected. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ViewPageSelectedProperty =
DependencyProperty.Register("ViewPageSelected", typeof(string), typeof(ViewPage), new PropertyMetadata(string.Empty));
public bool IsClick
{
get { return (bool)GetValue(IsClickProperty); }
set { SetValue(IsClickProperty, value); }
}
// Using a DependencyProperty as the backing store for IsClick. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsClickProperty =
DependencyProperty.Register("IsClick", typeof(bool), typeof(ViewPage), new PropertyMetadata(false));
public int CurrentIndexView
{
get { return (int)GetValue(CurrentIndexViewProperty); }
set { SetValue(CurrentIndexViewProperty, value); }
}
// Using a DependencyProperty as the backing store for CurrentIndexView. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CurrentIndexViewProperty =
DependencyProperty.Register("CurrentIndexView", typeof(int), typeof(ViewPage), new PropertyMetadata(0));
public int UserId
{
get { return (int)GetValue(UserIdProperty); }
set { SetValue(UserIdProperty, value); }
}
// Using a DependencyProperty as the backing store for UserId. This enables animation, styling, binding, etc...
public static readonly DependencyProperty UserIdProperty =
DependencyProperty.Register("UserId", typeof(int), typeof(ViewPage), new PropertyMetadata(1));
public bool IsLoaded
{
get { return (bool)GetValue(IsLoadedProperty); }
set { SetValue(IsLoadedProperty, value); }
}
// Using a DependencyProperty as the backing store for IsLoaded. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsLoadedProperty =
DependencyProperty.Register("IsLoaded", typeof(bool), typeof(ViewPage), new PropertyMetadata(false));
public static ViewPage Ins { get; private set; }
static ViewPage()
{
Ins = new ViewPage();
}
}
// public bool IsLoaded
// {
// get { return (bool)GetValue(IsLoadedProperty); }
// set { SetValue(IsLoadedProperty, value); }
// }
// // Using a DependencyProperty as the backing store for IsLoaded. This enables animation, styling, binding, etc...
// public static readonly DependencyProperty IsLoadedProperty =
// DependencyProperty.Register("IsLoaded", typeof(bool), typeof(ViewPage), new PropertyMetadata(false));
//}
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}