aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-09-14 13:21:10 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-09-14 13:22:27 +0300
commit38200150dd731b158448316835b069d3fef2bc8f (patch)
treec92f37e863ccaca287056994d9c5d4d6bc3738b1 /Software/Visual_Studio/Tango.Touch
parent99c757db6c5d9c67566b8c5ac6b3e5f18cb1010c (diff)
downloadTango-38200150dd731b158448316835b069d3fef2bc8f.tar.gz
Tango-38200150dd731b158448316835b069d3fef2bc8f.zip
Select All in PPC - new icon.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.cs b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.cs
index 4ec74caf8..838f68211 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.cs
@@ -168,6 +168,15 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty CollectionFilterProperty =
DependencyProperty.Register("CollectionFilter", typeof(ICollectionFilter), typeof(LightTouchDataGrid), new PropertyMetadata(null, (d, e) => (d as LightTouchDataGrid).OnCollectionFilterChanged()));
+ public bool SelectAll
+ {
+ get { return (bool)GetValue(SelectAllProperty); }
+ set { SetValue(SelectAllProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty SelectAllProperty =
+ DependencyProperty.Register("SelectAll", typeof(bool), typeof(LightTouchDataGrid), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, (d, e) => (d as LightTouchDataGrid).OnSelectedAllChanged()));
#endregion
#region Commands
@@ -412,6 +421,27 @@ namespace Tango.Touch.Controls
}
}
+ private void OnSelectedAllChanged()
+ {
+ if (IsMultiSelecting)
+ {
+ if (SelectAll)
+ {
+ foreach (var row in GetRows())
+ {
+ row.IsSelected = true;
+
+ }
+ UpdateSelectedItems();
+ }
+ else
+ {
+ ClearSelectedItems();
+ }
+ }
+ }
+
+
#endregion
#region Command Handlers
@@ -527,7 +557,6 @@ namespace Tango.Touch.Controls
CollectionFilter.FilterChanged += CollectionFilter_FilterChanged;
}
}
-
#endregion
#region Public Methods