1
using System
.Windows
.Controls
;
3 namespace ParasitemiaUIControls
5 public partial class RBCFrame
: UserControl
7 bool isTextBelow
= false;
11 this.InitializeComponent();
12 this.borderRBCNumber
.SizeChanged
+= BorderRBCNumber_SizeChanged
;
15 public bool IsTextBelow
17 get => this.isTextBelow
;
20 if (value != this.isTextBelow
)
22 this.isTextBelow
= value;
23 this.UpdateRBCNumberPosition();
28 void BorderRBCNumber_SizeChanged(object sender
, System
.Windows
.SizeChangedEventArgs e
)
30 this.UpdateRBCNumberPosition();
32 //this.UpdateLayout();
33 //System.Diagnostics.Debug.WriteLine($"ActuaSize: {this.borderRBCNumber.ActualHeight}");
36 void UpdateRBCNumberPosition()
38 var m
= this.borderRBCNumber
.Margin
;
42 ? - this.borderRBCNumber
.ActualHeight
- 0.05 * this.borderRBCNumber
.ActualHeight
43 : 0.05 * this.borderRBCNumber
.ActualHeight
;
45 this.borderRBCNumber
.Margin
= m
;