Questions tagged [avalonia]

AvaloniaUI is a multi-platform GUI framework using XAML for the creation of GUIs. It has many similarities to WPF and can run on Windows, Linux, macOS, Android and iOS. Questions on Avalonia XPF should use [avalonia-xpf] tag instead.

AvaloniaUI is a multi-platform GUI-Framework using XAML for the creation of GUIs. It has many similarities to WPF and can run on Windows, Linux, macOS, Android and iOS.

It's an open source project that can be viewed on GitHub: https://github.com/AvaloniaUI/Avalonia

The same team also work on Avalonia XPF, a cross-platform WPF clone.

270 questions
0
votes
0 answers

How to bind in Avalonia

I created View and ViewModel public class LoginUserViewModel : ViewModelBase { private string _appName; public string AppName { get => _appName; set => this.RaiseAndSetIfChanged(ref _appName, value); } public…
ErcodY
  • 21
  • 4
0
votes
1 answer

Set image path as variable in the application resources of Avalonia for re-using

I have a logo, which is used in certain places of my application. So I'd like to store it's path in a variable of my App.axaml file, which should allow me to reference this path as variable in the entire application. This works fine with colors like…
Lion
  • 16,606
  • 23
  • 86
  • 148
0
votes
1 answer

Automatically resize tab headers based on the count of tabs (AvaloniaUI)

I want to implement styling for TabControl in my browser like in chrome. The number of tabs is not fixed, so I want the tab headers to decrease depending on the number of tabs. To do this, I bind the width of the Grid in the DataTemplate to the…
Semyon
  • 13
  • 3
0
votes
1 answer

Avalonia ReactiveUI RoutedViewHost not creating embedding appropriate view

I was following this tutorial, which I do see is based on the .net core 2.1 framework, but adapted for the .net 5 avalonia.mvvm template. I followed the code line for line with the exception of the Program.cs file given the fact that the…
amdorsey12
  • 453
  • 5
  • 17
0
votes
1 answer

Where to Load ContentControl Styles in Avalonia Class Library?

I have a ContentControl/TemplatedControl written in Avalonia Class Library, and the styles defined in a file. To load the styles, in WPF, you'd need to add AssemblyInfo.cs with this hack using System.Windows; [assembly: ThemeInfo( …
Etienne Charland
  • 3,424
  • 5
  • 28
  • 58
0
votes
1 answer

Slider.IsMoveToPointEnabled in Avalonia

What's the equivalent of Slider.IsMoveToPointEnabled in Avalonia?
Etienne Charland
  • 3,424
  • 5
  • 28
  • 58
0
votes
1 answer

Mouse events are not triggered in Avalonia user control

I'm trying to add Pan and Zoom to custom user control in Avalonia 0.10.10 using mouse wheel and mouse move events. Standard avalonia template dotnet new avalonia.mvvm -o Demo User Control XAML
Anonymous
  • 1,823
  • 2
  • 35
  • 74
0
votes
1 answer

Avalonia notification causes the application to crash

I'm testing Avalonia notifications (C#, Windows 10, Visual Studio Community 2019). The following code crashes whenever I push the button and change the property 'Greeting'. I suppose the problem is what the remarks indicate in the picture. The…
pzogr
  • 424
  • 1
  • 12
  • 30
0
votes
0 answers

How to convert byte[] to StreamGeometry

I have a problem converting byte [] to StreamGeometry. There are various icons stored in Styles.xaml: M17.0606622,9 C17.8933043,9 18.7000032,9.27703406 19.3552116,9.78392956…
Tulesha
  • 9
  • 4
0
votes
0 answers

AvaloniaUI - Mocking Dispatcher

I need to unit test methods, which are executing some actions on UI thread, like: internal void MyMethod() { Dispatcher.UIThread.Post(() => { // some property set // some method call }); } One thing I want to test is, if…
user15123902
  • 123
  • 4
0
votes
0 answers

Why is my empty Avalonia app using 100% CPU?

I am using AvaloniaUI framework to build an application that I will run on Debian, even the empty application with no controls uses 100% of my CPU. The build is installed on a Raspberry Pi 7” Touchscreen. I'm using Avalonia version 0.10.3, I tried…
0
votes
1 answer

Avalonia change part of FluentTheme

I use for my application. I really like it but i want to change part of the design. For example swap the background to a bright pink. I tried overriding the style like this:
Hyding
  • 3
  • 1
  • 2
0
votes
1 answer

Classes is not an AvaloniaProperty

I'm trying to bind a value to the Classes property of some Avalonia Control from within a Style. But I get a Classes is not an AvaloniaProperty error diagnostic. The example below demonstrates the problem.