aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs31
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs4
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj3
3 files changed, 35 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs b/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs
new file mode 100644
index 000000000..e13436900
--- /dev/null
+++ b/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Tango.SharedUI.Components
+{
+ public class BindingProxy : Freezable
+ {
+ #region Overrides of Freezable
+
+ protected override Freezable CreateInstanceCore()
+ {
+ return new BindingProxy();
+ }
+
+ #endregion
+
+ public object Data
+ {
+ get { return (object)GetValue(DataProperty); }
+ set { SetValue(DataProperty, value); }
+ }
+
+ public static readonly DependencyProperty DataProperty =
+ DependencyProperty.Register("Data", typeof(object),
+ typeof(BindingProxy));
+ }
+}
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs
index d130ebaaf..e1255ef13 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs
@@ -15,11 +15,11 @@ namespace Tango.SharedUI.Converters
if (value != null)
{
string str = value.ToString();
- int newLineIndex = str.IndexOf(Environment.NewLine);
+ int newLineIndex = str.IndexOf("\n");
if (newLineIndex == -1)
{
- newLineIndex = str.IndexOf("\n");
+ newLineIndex = str.IndexOf(Environment.NewLine);
}
string firstline = str;
diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
index 000a4e5d7..a649d0c1a 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
+++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
@@ -67,6 +67,7 @@
<Compile Include="Binding\BindingEventArgs.cs" />
<Compile Include="Binding\BindingEventContainer.cs" />
<Compile Include="Binding\BindingProperty.cs" />
+ <Compile Include="Components\BindingProxy.cs" />
<Compile Include="Components\SelectedObject.cs" />
<Compile Include="Components\SelectedObjectCollection.cs" />
<Compile Include="Components\TextController.cs" />
@@ -255,7 +256,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file