mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Display conditions - Loosened up type rules for dynamic comparisons
Display conditions - Improved static value input and added support for int and double
This commit is contained in:
1 parent
913cfd2824
commit
3639185171
21 files changed
+197
-172
No files matched your search
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
|
||||
using Stylet;
|
||||
|
||||
@@ -27,6 +30,9 @@ namespace Artemis.UI.Shared.DataModelVisualization
|
||||
/// <inheritdoc />
|
||||
public sealed override void Submit()
|
||||
{
|
||||
foreach (var sourceUpdatingBinding in BindingOperations.GetSourceUpdatingBindings(View))
|
||||
sourceUpdatingBinding.UpdateSource();
|
||||
|
||||
OnSubmit();
|
||||
UpdateCallback(InputValue, true);
|
||||
}
|
||||
@@ -58,6 +64,13 @@ namespace Artemis.UI.Shared.DataModelVisualization
|
||||
throw new InvalidOperationException(string.Format("Tried to attach View {0} to ViewModel {1}, but it already has a view attached", view.GetType().Name, GetType().Name));
|
||||
|
||||
View = view;
|
||||
|
||||
// After the animation finishes attempt to focus the input field
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(400);
|
||||
await Execute.OnUIThreadAsync(() => View.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)));
|
||||
});
|
||||
}
|
||||
|
||||
public UIElement View { get; set; }
|
||||
|
||||
Reference in new issue
Block a user