aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs89
1 files changed, 89 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs
new file mode 100644
index 000000000..e5b542f45
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs
@@ -0,0 +1,89 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Core.Commands;
+
+namespace Tango.MachineStudio.ThreadExtensions.Views
+{
+ /// <summary>
+ /// Interaction logic for ComboboxEditable.xaml
+ /// </summary>
+ public partial class ComboboxEditable : UserControl
+ {
+ public ComboboxEditable()
+ {
+ InitializeComponent();
+ }
+
+
+ public IEnumerable ItemsSource
+ {
+ get { return (IEnumerable)GetValue(ItemsSourceProperty); }
+ set { SetValue(ItemsSourceProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for ItemsSource. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty ItemsSourceProperty =
+ DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ComboboxEditable), new PropertyMetadata(null));
+
+
+
+ public object SelectedItem
+ {
+ get { return (object)GetValue(SelectedItemProperty); }
+ set { SetValue(SelectedItemProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for SelectedItem. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty SelectedItemProperty =
+ DependencyProperty.Register("SelectedItem", typeof(object), typeof(ComboboxEditable), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+
+
+
+
+
+ public RelayCommand AddCommand
+ {
+ get { return (RelayCommand)GetValue(AddCommandProperty); }
+ set { SetValue(AddCommandProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty AddCommandProperty =
+ DependencyProperty.Register("AddCommand", typeof(RelayCommand), typeof(ComboboxEditable));
+
+ public RelayCommand EditCommand
+ {
+ get { return (RelayCommand)GetValue(EditCommandProperty); }
+ set { SetValue(EditCommandProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty EditCommandProperty =
+ DependencyProperty.Register("EditCommand", typeof(RelayCommand), typeof(ComboboxEditable));
+
+ public RelayCommand DeleteCommand
+ {
+ get { return (RelayCommand)GetValue(DeleteCommandProperty); }
+ set { SetValue(DeleteCommandProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty DeleteCommandProperty =
+ DependencyProperty.Register("DeleteCommand", typeof(RelayCommand), typeof(ComboboxEditable));
+
+
+ }
+}