Skip to content

Commit fd53d40

Browse files
committed
Update v2.0
1 parent a9b94b6 commit fd53d40

13 files changed

Lines changed: 596 additions & 25 deletions

EmptyKeys.UserInterface.Designer/EmptyKeys.UserInterface.Designer.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
<Compile Include="DataGrid.cs" />
7070
<Compile Include="DragDrop.cs" />
7171
<Compile Include="EventTrigger.cs" />
72+
<Compile Include="GeneratedBindingsMode.cs" />
73+
<Compile Include="GeneratedBindings.cs" />
7274
<Compile Include="Input\GamepadBinding.cs" />
7375
<Compile Include="Input\GamepadGesture.cs" />
7476
<Compile Include="Input\GamepadInput.cs" />
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
8+
namespace EmptyKeys.UserInterface.Designer
9+
{
10+
/// <summary>
11+
/// Implements attached properties for binding generator
12+
/// </summary>
13+
public sealed class GeneratedBindings
14+
{
15+
private static Type typeOfThis = typeof(GeneratedBindings);
16+
17+
/// <summary>
18+
/// The data type property
19+
/// </summary>
20+
public static readonly DependencyProperty DataTypeProperty =
21+
DependencyProperty.RegisterAttached("DataType", typeof(Type), typeOfThis,
22+
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.None));
23+
24+
/// <summary>
25+
/// Gets the type of the data.
26+
/// </summary>
27+
/// <param name="obj">The object.</param>
28+
/// <returns></returns>
29+
public static Type GetDataType(DependencyObject obj)
30+
{
31+
return (Type)obj.GetValue(DataTypeProperty);
32+
}
33+
34+
/// <summary>
35+
/// Sets the type of the data.
36+
/// </summary>
37+
/// <param name="obj">The object.</param>
38+
/// <param name="value">The value.</param>
39+
public static void SetDataType(DependencyObject obj, Type value)
40+
{
41+
obj.SetValue(DataTypeProperty, value);
42+
}
43+
44+
45+
/// <summary>
46+
/// The mode property
47+
/// </summary>
48+
public static readonly DependencyProperty ModeProperty =
49+
DependencyProperty.RegisterAttached("Mode", typeof(GeneratedBindingsMode), typeOfThis,
50+
new FrameworkPropertyMetadata(GeneratedBindingsMode.Generated));
51+
52+
/// <summary>
53+
/// Gets the mode.
54+
/// </summary>
55+
/// <param name="obj">The object.</param>
56+
/// <returns></returns>
57+
public static GeneratedBindingsMode GetMode(DependencyObject obj)
58+
{
59+
return (GeneratedBindingsMode)obj.GetValue(ModeProperty);
60+
}
61+
62+
/// <summary>
63+
/// Sets the mode.
64+
/// </summary>
65+
/// <param name="obj">The object.</param>
66+
/// <param name="value">The value.</param>
67+
public static void SetMode(DependencyObject obj, GeneratedBindingsMode value)
68+
{
69+
obj.SetValue(ModeProperty, value);
70+
}
71+
}
72+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace EmptyKeys.UserInterface.Designer
8+
{
9+
/// <summary>
10+
/// Describes modes for binding generator
11+
/// </summary>
12+
public enum GeneratedBindingsMode
13+
{
14+
// Bindings are generated
15+
Generated,
16+
// Bindings are ignored and using reflection
17+
Reflection,
18+
// Bindings can use both, reflection and generated
19+
Mixed,
20+
// Bindings with custom type
21+
Manual
22+
}
23+
}

GlobalAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313

1414
[assembly: NeutralResourcesLanguage("en")]
1515

16-
[assembly: AssemblyVersion("1.13.0.0")]
17-
[assembly: AssemblyFileVersion("1.13.0.0")]
16+
[assembly: AssemblyVersion("2.0.0.0")]
17+
[assembly: AssemblyFileVersion("2.0.0.0")]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Empty Keys, Filip Du�ek
3+
Copyright (c) 2016 Empty Keys, Filip Du�ek
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)