aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs
blob: 3ac597e083e4fe3012b2cbf180144d91d05c009e (plain)
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
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango.Scripting.IDE")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Tango.Scripting.IDE")]
[assembly: AssemblyCopyright("Copyright ©  2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>.  For example, if you are using US english
//in your source files, set the <UICulture> to en-US.  Then uncomment
//the NeutralResourceLanguage attribute below.  Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly:ThemeInfo(
    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
                             //(used if a resource is not found in the page,
                             // or application resource dictionaries)
    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
                                      //(used if a resource is not found in the page,
                                      // app, or any theme specific resource dictionaries)
)]


// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Tango.Touch.Controls { public class TouchToggleSlider : ToggleButton { private Grid _grid_ellipse; static TouchToggleSlider() { DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchToggleSlider), new FrameworkPropertyMetadata(typeof(TouchToggleSlider))); } public CornerRadius CornerRadius { get { return (CornerRadius)GetValue(CornerRadiusProperty); } set { SetValue(CornerRadiusProperty, value); } } public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TouchToggleSlider), new PropertyMetadata(default(CornerRadius))); public Brush ThumbBrush { get { return (Brush)GetValue(ThumbBrushProperty); } set { SetValue(ThumbBrushProperty, value); } } public static readonly DependencyProperty ThumbBrushProperty = DependencyProperty.Register("ThumbBrush", typeof(Brush), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Object UncheckedContent { get { return (Object)GetValue(UncheckedContentProperty); } set { SetValue(UncheckedContentProperty, value); } } public static readonly DependencyProperty UncheckedContentProperty = DependencyProperty.Register("UncheckedContent", typeof(Object), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Object CheckedContent { get { return (Object)GetValue(CheckedContentProperty); } set { SetValue(CheckedContentProperty, value); } } public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register("CheckedContent", typeof(Object), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Object UncheckedThumbContent { get { return (Object)GetValue(UncheckedThumbContentProperty); } set { SetValue(UncheckedThumbContentProperty, value); } } public static readonly DependencyProperty UncheckedThumbContentProperty = DependencyProperty.Register("UncheckedThumbContent", typeof(Object), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Object CheckedThumbContent { get { return (Object)GetValue(CheckedThumbContentProperty); } set { SetValue(CheckedThumbContentProperty, value); } } public static readonly DependencyProperty CheckedThumbContentProperty = DependencyProperty.Register("CheckedThumbContent", typeof(Object), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Brush UncheckedBackground { get { return (Brush)GetValue(UncheckedBackgroundProperty); } set { SetValue(UncheckedBackgroundProperty, value); } } public static readonly DependencyProperty UncheckedBackgroundProperty = DependencyProperty.Register("UncheckedBackground", typeof(Brush), typeof(TouchToggleSlider), new PropertyMetadata(null)); public Brush CheckedBackground { get { return (Brush)GetValue(CheckedBackgroundProperty); } set { SetValue(CheckedBackgroundProperty, value); } } public static readonly DependencyProperty CheckedBackgroundProperty = DependencyProperty.Register("CheckedBackground", typeof(Brush), typeof(TouchToggleSlider), new PropertyMetadata(null)); public DataTemplate UncheckedThumbContentTemplate { get { return (DataTemplate)GetValue(UncheckedThumbContentTemplateProperty); } set { SetValue(UncheckedThumbContentTemplateProperty, value); } } public static readonly DependencyProperty UncheckedThumbContentTemplateProperty = DependencyProperty.Register("UncheckedThumbContentTemplate", typeof(DataTemplate), typeof(TouchToggleSlider), new PropertyMetadata(null)); public DataTemplate CheckedThumbContentTemplate { get { return (DataTemplate)GetValue(CheckedThumbContentTemplateProperty); } set { SetValue(CheckedThumbContentTemplateProperty, value); } } public static readonly DependencyProperty CheckedThumbContentTemplateProperty = DependencyProperty.Register("CheckedThumbContentTemplate", typeof(DataTemplate), typeof(TouchToggleSlider), new PropertyMetadata(null)); public TouchToggleSlider() { Loaded += TouchToggleSlider_Loaded; } private void TouchToggleSlider_Loaded(object sender, RoutedEventArgs e) { SetThumbPosition(); } public override void OnApplyTemplate() { base.OnApplyTemplate(); _grid_ellipse = GetTemplateChild("PART_GridEllipse") as Grid; } protected override void OnChecked(RoutedEventArgs e) { base.OnChecked(e); SetThumbPosition(); } protected override void OnUnchecked(RoutedEventArgs e) { base.OnUnchecked(e); SetThumbPosition(); } private void SetThumbPosition() { if (_grid_ellipse != null) { ThicknessAnimation ani = new ThicknessAnimation(); ani.Duration = TimeSpan.FromSeconds(0.2); if (IsChecked.Value) { ani.To = new Thickness(ActualWidth - _grid_ellipse.ActualWidth - 4, 0, 0, 0); } else { ani.To = new Thickness(0, 0, 0, 0); } _grid_ellipse.BeginAnimation(Grid.MarginProperty, ani); } } } }