Skip to content

Commit 352f1f8

Browse files
committed
Mark current thumbnail
1 parent 14db55a commit 352f1f8

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

GuiWithThumbnail.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using System;
22
using System.ComponentModel;
3-
using System.Drawing;
43
using System.Linq;
54
using System.Windows;
65
using System.Windows.Controls;
76
using System.Windows.Controls.Primitives;
7+
using System.Windows.Media;
88
using System.Windows.Media.Imaging;
9+
using System.Windows.Shapes;
910

1011
namespace VietOCR
1112
{
@@ -61,6 +62,21 @@ private void backgroundWorkerLoadThumbnail_ProgressChanged(object sender, Progre
6162
rb.Tag = e.ProgressPercentage;
6263
rb.Click += new RoutedEventHandler(this.radioButton_Click);
6364
this.panelThumbnail.Children.Add(rb);
65+
Rectangle rect = new Rectangle();
66+
rect.HorizontalAlignment = HorizontalAlignment.Right;
67+
rect.Width = 10;
68+
rect.Height = 10;
69+
SolidColorBrush mySolidColorBrush = new SolidColorBrush();
70+
mySolidColorBrush.Color = System.Windows.Media.Color.FromArgb(255, 0, 128, 128);
71+
//rect.Stroke = mySolidColorBrush;
72+
rect.Fill = mySolidColorBrush;
73+
rect.Margin= new Thickness(0, -10, 0, 0);
74+
75+
System.Windows.Data.Binding binding = new System.Windows.Data.Binding("IsChecked");
76+
binding.Converter = new System.Windows.Controls.BooleanToVisibilityConverter();
77+
binding.Source = rb;
78+
rect.SetBinding(UIElement.VisibilityProperty, binding);
79+
this.panelThumbnail.Children.Add(rect);
6480
Label label = new Label();
6581
label.Content = e.ProgressPercentage + 1;
6682
label.HorizontalAlignment = HorizontalAlignment.Center;

0 commit comments

Comments
 (0)