mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 19:46:29 +00:00
polish autodetection
This commit is contained in:
@@ -26,6 +26,7 @@ public class AnnotationControl : Border
|
||||
set
|
||||
{
|
||||
_grid.Background = value.ColorBrush;
|
||||
_probabilityLabel.Background = value.ColorBrush;
|
||||
_classNameLabel.Text = value.Name;
|
||||
_annotationClass = value;
|
||||
}
|
||||
@@ -59,10 +60,12 @@ public class AnnotationControl : Border
|
||||
};
|
||||
_probabilityLabel = new Label
|
||||
{
|
||||
Content = probability?.ToString("F1") ?? string.Empty,
|
||||
Content = probability.HasValue ? $"{probability.Value:F0}%" : string.Empty,
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
Margin = new Thickness(0, -15, 0, 0),
|
||||
Margin = new Thickness(0, -32, 0, 0),
|
||||
FontSize = 16,
|
||||
Visibility = Visibility.Visible
|
||||
};
|
||||
_selectionFrame = new Rectangle
|
||||
{
|
||||
@@ -81,6 +84,7 @@ public class AnnotationControl : Border
|
||||
{
|
||||
_selectionFrame,
|
||||
_classNameLabel,
|
||||
_probabilityLabel,
|
||||
AddRect("rLT", HorizontalAlignment.Left, VerticalAlignment.Top, Cursors.SizeNWSE),
|
||||
AddRect("rCT", HorizontalAlignment.Center, VerticalAlignment.Top, Cursors.SizeNS),
|
||||
AddRect("rRT", HorizontalAlignment.Right, VerticalAlignment.Top, Cursors.SizeNESW),
|
||||
|
||||
Reference in New Issue
Block a user