A multi-platform .NET UI framework. -!-!-!-!- VOTE FOR SUPPORT IN RIDER: https://youtrack.jetbrains.com/issue/RIDER-39247 -!-!-!-!-
grokys on issue-template-labels
Removed unnecessary Avalonia.Bu… Set Avalonia.Build.Tasks Projec… Fixes nuget downgrade warning and 50 more (compare)
danwalmsley on 0.10.0
bump version. bump versions. (compare)
danwalmsley on master
Added splash screen. Removed un… Merge branch 'master' into andr… Merge branch 'master' into andr… and 1 more (compare)
var mwTemp = new MainWindowViewModel(this.sqrlInstance);
w.DataContext = mwTemp;
w.WindowStartupLocation = Avalonia.Controls.WindowStartupLocation.CenterOwner;
mwTemp.Content = new AskViewModel(this.sqrlInstance, this.Identity, serverResponse);
await w.ShowDialog(AvaloniaLocator.Current.GetService<MainWindow>());
NumericUpDown
and add a "Small Increment". Somethings are private though. So might have to copy the code and create a new one. My goal is to have a numeric textbox like in Blender: buttons either side of input; click and drag to increment/decrement; use a key modifier to use small increment; be able to do basic math.
So I changed the TextBox.Text
binding in my NumericUpDown
template to {TemplateBinding Text, Converter={x:Static cv:MathExpressionConverter.Instance }, Mode=TwoWay}
. And made my converter like so:
public class MathExpressionConverter : IValueConverter
{
public static readonly MathExpressionConverter Instance = new MathExpressionConverter();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string input && MathExpressionParser.TryParseExpression(input, out var expression))
{
return expression.Compile().Invoke().ToString();
}
return new BindingNotification(new Exception("Invalid expression."), BindingErrorType.DataValidationError);
}
}
And I pretty much get what I want. It does the calculation without clearing the expression and when you press enter it commits the answer and displays the result. IDK how that works.
@grokys
@openmandev sounds like a bug. could you open an issue with a minimal repro and i'll try to fix it