fixed some issues at design time
This commit is contained in:
1 parent
1c060d46d6
commit
3e90fca0f2
6 files changed
+23
-15
No files matched your search
@@ -400,6 +400,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private void TimeBar_OnSizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
if (_canvasSpe == null) return;
|
||||
_speBlockList.Clear();
|
||||
_canvasSpe.Children.Clear();
|
||||
|
||||
@@ -442,7 +443,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var p = Mouse.GetPosition(this);
|
||||
var mlliseconds = (p.X - ActualWidth / 2) / _itemWidth * _timeSpeList[_speIndex];
|
||||
if (double.IsInfinity(mlliseconds)) return;
|
||||
if (double.IsNaN(mlliseconds) || double.IsInfinity(mlliseconds)) return;
|
||||
_textBlockMove.Text = mlliseconds < 0
|
||||
? (SelectedTime - TimeSpan.FromMilliseconds(-mlliseconds)).ToString(TimeFormat)
|
||||
: (SelectedTime + TimeSpan.FromMilliseconds(mlliseconds)).ToString(TimeFormat);
|
||||
|
||||
Reference in new issue
Block a user