| ofs | hex dump | ascii |
|---|
| 0000 | ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff e1 00 18 45 78 69 66 00 00 49 49 | ......JFIF.....H.H......Exif..II |
| 0020 | 2a 00 08 00 00 00 00 00 00 00 00 00 00 00 ff db 00 43 00 03 02 02 02 02 02 03 02 02 02 03 03 03 | *................C.............. |
| 0040 | 03 04 06 04 04 04 04 04 08 06 06 05 06 09 08 0a 0a 09 08 09 09 0a 0c 0f 0c 0a 0b 0e 0b 09 09 0d | ................................ |
| 0060 | 11 0d 0e 0f 10 10 11 10 0a 0c 12 13 12 10 13 0f 10 10 10 ff db 00 43 01 03 03 03 04 03 04 08 04 | ......................C......... |
| 0080 | 04 08 10 0b 09 0b 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 | ................................ |
| 00a0 | 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ff c0 00 11 08 04 38 07 | ..............................8. |
| 00c0 | 80 03 01 11 00 02 11 01 03 11 01 ff c4 00 1d 00 00 01 04 03 01 01 00 00 00 00 00 00 00 00 00 00 | ................................ |
| 00e0 | 00 04 05 07 08 01 03 06 02 09 ff c4 00 6d 10 00 01 02 04 03 04 05 05 09 08 0b 09 0c 09 03 05 01 | .............m.................. |
| 0100 | 02 03 00 04 05 11 06 07 21 12 31 41 51 08 13 14 61 71 22 32 52 81 91 15 18 42 56 62 94 a1 d1 d2 | ........!.1AQ...aq"2R....BVb.... |
| 0120 | 16 17 23 92 93 95 b1 c1 33 43 46 53 55 72 b2 b3 d3 e1 f0 36 37 54 57 73 74 75 82 84 24 34 35 44 | ..#.....3CFSUr.....67TWstu..$45D |
| 0140 | 45 63 65 85 96 a2 b4 e2 25 26 27 38 47 64 83 a3 c2 28 86 a4 a5 f1 66 e3 c3 ff c4 00 1b 01 01 00 | Ece.....%&'8Gd...(....f......... |
| 0160 | 03 01 01 01 01 00 00 00 00 00 00 00 00 00 00 01 03 04 02 05 06 07 ff c4 00 37 11 00 02 02 01 03 | .........................7...... |
| 0180 | 03 03 02 04 06 02 01 05 01 01 00 00 01 02 03 11 04 12 31 13 21 51 14 22 41 32 61 05 33 52 a1 23 | ..................1.!Q."A2a.3R.# | /***************** NCore Softwares Pvt. Ltd., India **************************
ColorBox
Copyright (C) 2013 NCore Softwares Pvt. Ltd.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://colorbox.codeplex.com/license
***********************************************************************************/
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Linq;
using System.Collections;
namespace Tango.BrushPicker
{
class GradientStopSlider : Slider
{
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
{
base.OnPreviewMouseLeftButtonDown(e);
if (this.ColorBox != null)
{
this.ColorBox._BrushSetInternally = true;
this.ColorBox._UpdateBrush = false;
this.ColorBox.SelectedGradient = this.SelectedGradient;
this.ColorBox.Color = this.SelectedGradient.Color;
this.ColorBox._UpdateBrush = true;
}
}
protected override void OnValueChanged(double oldValue, double newValue)
{
if (ColorBox != null && ColorBox.Gradients != null)
{
if (ColorBox.Gradients.FirstOrDefault() == SelectedGradient)
{
Value = 0;
return;
}
else if (ColorBox.Gradients.LastOrDefault() == SelectedGradient)
{
Value = 1;
return;
}
}
base.OnValueChanged(oldValue, newValue);
if (this.ColorBox != null)
{
//this.ColorBox._HSBSetInternally = true;
//this.ColorBox._RGBSetInternally = true;
this.ColorBox._BrushSetInternally = true;
this.ColorBox.SetBrush();
this.ColorBox._HSBSetInternally = false;
//this.ColorBox._RGBSetInternally = false;
//this.ColorBox._BrushSetInternally = false;
}
}
public BrushPicker ColorBox
{
get { return (BrushPicker)GetValue(ColorBoxProperty); }
set { SetValue(ColorBoxProperty, value); }
}
public static readonly DependencyProperty ColorBoxProperty =
DependencyProperty.Register("ColorBox", typeof(BrushPicker), typeof(GradientStopSlider));
public GradientStop SelectedGradient
{
get { return (GradientStop)GetValue(SelectedGradientProperty); }
set { SetValue(SelectedGradientProperty, value); }
}
public static readonly DependencyProperty SelectedGradientProperty =
DependencyProperty.Register("SelectedGradient", typeof(GradientStop), typeof(GradientStopSlider));
}
}