|
1 | 1 | using System; |
2 | 2 | using System.ComponentModel; |
3 | | -using System.Drawing; |
4 | 3 | using System.Linq; |
5 | 4 | using System.Windows; |
6 | 5 | using System.Windows.Controls; |
7 | 6 | using System.Windows.Controls.Primitives; |
| 7 | +using System.Windows.Media; |
8 | 8 | using System.Windows.Media.Imaging; |
| 9 | +using System.Windows.Shapes; |
9 | 10 |
|
10 | 11 | namespace VietOCR |
11 | 12 | { |
@@ -61,6 +62,21 @@ private void backgroundWorkerLoadThumbnail_ProgressChanged(object sender, Progre |
61 | 62 | rb.Tag = e.ProgressPercentage; |
62 | 63 | rb.Click += new RoutedEventHandler(this.radioButton_Click); |
63 | 64 | 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); |
64 | 80 | Label label = new Label(); |
65 | 81 | label.Content = e.ProgressPercentage + 1; |
66 | 82 | label.HorizontalAlignment = HorizontalAlignment.Center; |
|
0 commit comments