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
10
votes
2 answers

How is Avalonia to develop crossplatform application?

I am a WPF developer. Our team is looking for a good cross-platform solution to replace the old desktop product developed with WPF. We recently found that Avalonia might be one of the great ways, but it seems like there are not many demo cases or…
CHRISQQ
  • 125
  • 1
  • 9
8
votes
1 answer

How to set Title for OpenFolderDialog in an Avalonia application?

I'm working with OpenFileDialog, SaveFileDialog and OpenFolderDialog in an Avalonia application. One requirement is to set the title to a certain string. I achieved this for OpenFileDialog and SaveFileDialog but not for…
Zoldan
  • 164
  • 9
7
votes
1 answer

AvaloniaUI - What is the proper way to inject ViewModels into Views using composition-root based DI system?

I am new to Avalonia/ WPF, Xaml and desktop development in general so please forgive and clarify any related misunderstandings I demonstrate. I will continue to study available documentation but I am having a difficult time finding material which…
tyhdev
  • 123
  • 1
  • 3
  • 7
7
votes
1 answer

Avalonia: How to animate points in path using code

I'm trying to figure out how to do animations in Avalonia. I have a path with 4 linesegements and I want to animate each point to a new position. In WPF I have done it like this: public void AnimatePoints(PointCollection pts, TimeSpan…
Niels Bosma
  • 11,758
  • 29
  • 89
  • 148
6
votes
2 answers

AvaloniaUI Styles-pseudoclasses

I'm trying out styles in avalonia and most works, except for pseudoclasses, they just get ignored. I have created a window and all styles are in there and I have created a user control (with a button on - the pseudoclasses are on the button), using…
Geertie
  • 237
  • 4
  • 15
5
votes
2 answers

Horizontal centering of button text in AvaloniaUI Button

I have been trying various techniques to try and get the button label text center aligned. When I look at the button in the Avalonia DevTools inpspector, I can see the the AccessText TextAlignment is always set to Left. Here is one attempt at…
Gene Z. Ragan
  • 2,643
  • 2
  • 31
  • 41
5
votes
0 answers

Transparency and click through in Avalonia

I am thinking about porting my app made in WPF to Avalonia. My first requirement is to enable click-through transparency (same as
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
5
votes
1 answer

How to use WhenActivated with properties in avalonia

I am trying to use ReactiveUI along with Avalonia. Due to initialization order in Avalonia 0.10 preview following code fails: class ViewModel : IActivatableViewModel { public ViewModel(){ this.WhenActivated(disposables => { …
Shadow
  • 2,089
  • 2
  • 23
  • 45
5
votes
0 answers

Why Drag&Drop with files doesn't work in a Window of an Avalonia application?

I'm trying to implement Drag & Drop with files on a ListBox which is contained in a Window of an Avalonia project. As I couldn't get it working and I thought that ListBox perhaps is a special case, I tried to make a similar example like the one from…
Zoldan
  • 164
  • 9
5
votes
4 answers

Avalonia button click event is not working

I have a simple Avalonia form:
ekolis
  • 6,270
  • 12
  • 50
  • 101
4
votes
0 answers

How to Navigate to different page in avalonia UI using Community Toolkit MVVM package

I have created a project using Avalonia UI MVVM C# project. and I am very new to this. I am using the Community Toolkit MVVM package, not the Reactive UI package. There are two pages, "MainWindow" and "SettingWindow". There is a button on the…
yasith rangana
  • 196
  • 2
  • 12
4
votes
0 answers

RuntimeIdentifiers and custom output path in a net6 multi-platform application

I develop a net6 application for both win64 and osx-x64 and I would like to set the OutputPath to a custom path. I started with only the win64 version. I use the x64 solution configuration Here was my csproj :
Whiletrue
  • 551
  • 1
  • 7
  • 18
4
votes
1 answer

Application settings equivalent for Avalonia

I was checking out Avalonia for porting over a WPF project, but I saw under the project settings there is no tab for application settings, only for resources. In the WPF version of the app, I use Settings.Default.Save() and Settings.Default.Reset()…
phiphiphi
  • 146
  • 1
  • 8
4
votes
2 answers

Setting window icon in Avalonia

I am writing a small app for as a school project and I cannot figure out how can I change the window icon. I found the "Icon" property of Window, but I have no clue how it works, as I have found little documentation on it. When I tried to input…
Desfell
  • 49
  • 1
  • 5
4
votes
1 answer

AvaloniaUI: Capture mouse button up/down globally

Is there a possibility in AvaloniaUI, to globally capture mouse press button up/down? To be notified about this events outside of any controls (or possibly outside of any particular view model)?
user15123902
  • 123
  • 4
1
2 3
17 18