├── Images
└── Custom Scrollbar Image.jpg
├── LICENSE
├── README.md
├── Source
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
└── Styles.xaml
├── WPF Custom Scrollbar - Preview.png
└── WPF Custom Scrollbar.rar
/Images/Custom Scrollbar Image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CSharpDesignPro/WPF-Custom-Scrollbar/195dba07871ee9e244d93de923cd88783dd5cd7a/Images/Custom Scrollbar Image.jpg
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Arun Mutharasu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WPF - Custom Scroll Bar / Scroll Viewer
2 |
3 |
4 | How to design a Custom Scrollbar in WPF - https://youtu.be/3GDVWNfdo5A
5 |
6 | 
7 |
8 | Icon Credits : https://icons8.com/icons
9 |
10 | GitHub Account : https://github.com/CSharpDesignPro
11 |
12 |
--------------------------------------------------------------------------------
/Source/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Source/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Custom_Scrollbar
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Source/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
35 |
36 |
38 |
39 |
40 |
41 |
72 |
73 |
74 |
75 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
93 |
94 |
95 |
96 |
97 |
104 |
105 |
106 |
107 |
108 |
116 |
117 |
118 |
120 |
121 |
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 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
244 |
245 |
246 |
247 |
248 |
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 |
--------------------------------------------------------------------------------
/Source/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | /// Summary ///
3 | /// Author : R. Arun Mutharasu ///
4 | /// Created : 12-02-2020
5 | /// YouTube Channel : C# Design Pro ///
6 | /// Summary ///
7 |
8 | using System;
9 | using System.Collections.Generic;
10 | using System.Linq;
11 | using System.Text;
12 | using System.Threading.Tasks;
13 | using System.Windows;
14 | using System.Windows.Controls;
15 | using System.Windows.Data;
16 | using System.Windows.Documents;
17 | using System.Windows.Input;
18 | using System.Windows.Media;
19 | using System.Windows.Media.Imaging;
20 | using System.Windows.Navigation;
21 | using System.Windows.Shapes;
22 |
23 | namespace Custom_Scrollbar
24 | {
25 | ///
26 | /// Interaction logic for MainWindow.xaml
27 | ///
28 | public partial class MainWindow : Window
29 | {
30 | public MainWindow()
31 | {
32 | InitializeComponent();
33 | }
34 |
35 | private void Close_Btn_Click(object sender, RoutedEventArgs e)
36 | {
37 | this.Close();
38 | }
39 | }
40 |
41 | ///
42 | /// Create a Value Converter to disable the Up & Down Arrow buttons of the scrollbar
43 | /// when the Thumb reaches the minimum & maximum position on the scroll track.
44 | ///
45 |
46 | public class ScrollLimitConverter : IMultiValueConverter
47 | {
48 | public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
49 | {
50 | if (values.Length == 2 && values[0] is double && values[1] is double)
51 | {
52 | return (double)values[0] == (double)values[1];
53 | }
54 | return false;
55 | }
56 |
57 | public object[] ConvertBack(object value, Type[] targetType, object parameter, System.Globalization.CultureInfo culture)
58 | {
59 | throw new NotImplementedException();
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/Source/Styles.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
36 |
37 |
38 |
39 |
52 |
53 |
54 |
55 |
56 |
57 |
76 |
77 |
78 |
79 |
80 |
100 |
101 |
102 |
103 |
104 |
105 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/WPF Custom Scrollbar - Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CSharpDesignPro/WPF-Custom-Scrollbar/195dba07871ee9e244d93de923cd88783dd5cd7a/WPF Custom Scrollbar - Preview.png
--------------------------------------------------------------------------------
/WPF Custom Scrollbar.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CSharpDesignPro/WPF-Custom-Scrollbar/195dba07871ee9e244d93de923cd88783dd5cd7a/WPF Custom Scrollbar.rar
--------------------------------------------------------------------------------