feat: add LargeMessageBoxControl and improve MessageBox functionality
This commit is contained in:
@@ -133,15 +133,22 @@ public class Marquee : ContentControl
|
||||
|
||||
private void TimerOnTick(object? sender, System.EventArgs e)
|
||||
{
|
||||
if (Presenter is null) return;
|
||||
var layoutValues = Dispatcher.UIThread.Invoke(GetLayoutValues);
|
||||
var location = UpdateLocation(layoutValues);
|
||||
if (location is null) return;
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
try
|
||||
{
|
||||
Canvas.SetTop(Presenter, location.Value.top);
|
||||
Canvas.SetLeft(Presenter, location.Value.left);
|
||||
}, DispatcherPriority.Render);
|
||||
if (Presenter is null) return;
|
||||
var layoutValues = Dispatcher.UIThread.Invoke(GetLayoutValues);
|
||||
var location = UpdateLocation(layoutValues);
|
||||
if (location is null) return;
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
Canvas.SetTop(Presenter, location.Value.top);
|
||||
Canvas.SetLeft(Presenter, location.Value.left);
|
||||
}, DispatcherPriority.Render);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// pass
|
||||
}
|
||||
}
|
||||
|
||||
private void InvalidatePresenterPosition()
|
||||
@@ -277,4 +284,4 @@ struct LayoutValues
|
||||
public Direction Direction { get; set; }
|
||||
public HorizontalAlignment HorizontalAlignment { get; set; }
|
||||
public VerticalAlignment VerticalAlignment { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user