aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2021-11-15 14:08:38 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2021-11-15 14:08:38 +0200
commitb53bea7ed0a615a23f841c20707d00dbcc32c91b (patch)
tree2bd1bdb65dc57741849681fe944fd9b6dda51f98 /Software/Visual_Studio/PPC/Tango.PPC.Common/Controls
parenta74ecac5d1980775f10d719fe8ae93b0695eee72 (diff)
downloadTango-b53bea7ed0a615a23f841c20707d00dbcc32c91b.tar.gz
Tango-b53bea7ed0a615a23f841c20707d00dbcc32c91b.zip
PPC. Color Selection Dialog. Disable buttons OK, Validation when select CMYK tab from Catalog, gui changes.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Controls')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs15
2 files changed, 19 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
index 22a0f4825..8b7ea81c5 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs
@@ -159,11 +159,10 @@ namespace Tango.PPC.Common.Controls
private void CollectionFilter_FilterChanged(object sender, EventArgs e)
{
_findInProcess = true;
- //if (CollectionFilter != null )
- //{
- // row.Visibility = CollectionFilter.Filter(row.DataContext) ? Visibility.Visible : Visibility.Collapsed;
- // display = row.Visibility == Visibility.Visible;
- //}
+ if (CollectionFilter != null )
+ {
+ renderer.ScrollToFirstFindItem(CollectionFilter);
+ }
_findInProcess = false;
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
index 1f9a42561..9b865c18b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
@@ -11,6 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Tango.BL.Entities;
+using Tango.Touch.Components;
using Tango.Touch.Controls;
namespace Tango.PPC.Common.Controls
@@ -363,5 +364,19 @@ namespace Tango.PPC.Common.Controls
return _children[index];
}
+ public void ScrollToFirstFindItem(ICollectionFilter collectionFilter)
+ {
+ foreach (var group in _groupItems.Where(x => x.Items.Count > 0).Reverse().ToList())
+ {
+ foreach( var item in group.Items)
+ {
+ if(collectionFilter.Filter(item.Item))
+ {
+ _scrollViewer.ScrollToPosition(item.PositionY - _scrollViewer.ActualHeight / 2);
+ break;
+ }
+ }
+ }
+ }
}
}