590 questions
0
votes
1
answer
34
views
How to dynamically create and data-bind ComboBox in code?
In my Avalonia app using the MVVM Community Toolkit, I need to dynamically create a ComboBox from code-behind, having it data-bound to a collection of a subclass of a class that encapsulates ...
2
votes
2
answers
84
views
How to globally override the default value of a property in Avalonia?
I'm trying to override the default value of ToolTip.ShowOnDisabledProperty to be true for all controls.
I've tried the following:
static App()
{
ToolTip.ShowOnDisabledProperty.OverrideDefaultValue&...
0
votes
0
answers
54
views
How to remove the sharp edges of Custom TitleBar in Avalonia UI?
I am working on Avalonia UI and I am having difficulty removing the sharp transparent edges from my UI. I wanted to make a custom Title bar which will perform similar to the default titlebar but I am ...
1
vote
0
answers
77
views
In Avalonia, using a ListBox's VirtualizingStackPanel causes slow Page loading
In my app, I use a viewmodel variable in conjunction with the viewlocator to switch between pages on the window.
<Grid Grid.Row="0" Grid.Column="1" Grid.RowSpan="2">...
0
votes
1
answer
169
views
.NET 8.0 Avalonia browser application stuck on splash screen
I am developing an Avalonia application and I decided to try the multi-platform.
The project I started is using .NET 8.0, infact I installed the .NET 8.0.121 SDK. When I start the application on the ...
2
votes
1
answer
158
views
How can I edit text inside Avalonia DataGrid cell and take the new text value of that cell to make a query?
I'm developing an Avalonia Application and I'm trying to figure out how can I make a DataGrid cell editable, here's my DataGrid to make it more clear:
<DataGrid IsReadOnly="False" ...
0
votes
0
answers
64
views
How to bind to a listbox item's automation ID?
I have a listbox defined as follows:
<ListBox Name="MyListBox"
AutomationProperties.AutomationId="MyWindow_MyListBox"
ItemsSource="{Binding MyItems}"
...
1
vote
2
answers
85
views
How to distinguish my own styles for light and dark theme
Currently, in my AvaloniaUI app, I have a AppStyles.axaml containing some hard-coded style definitions for a few of the StreamGeometry icons taken from https://avaloniaui.github.io/icons.html:
<...
1
vote
1
answer
101
views
position of pointer on PointerMovedEvent in Avalonia UI changes only once
I've created a custom button in Avalonia UI. It is intended to be used as 'momentary' button (active on press, inactive on release). On pc/mouse environment everything works ok. But on touch device, ...
-2
votes
1
answer
82
views
TreeView data binding to another control [closed]
I have a TreeView that uses data binding to render itself.
When a given node in the TreeView is selected, I want to update a TextBox with that node's data.
When the user edits the text in the TextBox, ...
1
vote
0
answers
59
views
Detecting theme change for XAML-based update
In my AvaloniaUI application I have a user control that's basically a PathIcon with a TextBlock caption, the contents of which are bound to dependency properties. One DP is IsActive, which when true ...
0
votes
1
answer
162
views
Property not updating view when getting changed from another VM
I am using Avalonia with CommunityToolkit MVVM. When I change the Property (integer) within the original VM, where it is defined, it does update the view. When I change the Property from a child class,...
0
votes
0
answers
32
views
I can't load image in Avalonia in radiobutton
I want to create my own style for a radio button in Avalonia, but when I want to set an image using a binding, the image doesn't load. If I try to load the image directly as an image source, it works.
...
0
votes
0
answers
98
views
Showing AutocompleteBox dropdown when textbox is empty
I'm using Avalonia 11.0 and I need to accomplish the following behaviour on a custom Autocompletebox control:
If the input text is empty the dialog should show all the items of the collection the ...
-1
votes
2
answers
203
views
Avalonia Binding property to custom control cast to other type and throw exception [closed]
I have Custom control, looking like this:
using Avalonia;
using Avalonia.Controls;
using Client.Attributes;
using Client.ViewModels;
namespace Client.Controls;
[ViewModel(typeof(...
0
votes
0
answers
107
views
Avalonia UI on Arch Linux (Hyprland) - Android/iOS builds fail with [NETSDK1139] error - Workaround?
I’m trying to run a cross-platform Avalonia UI app on Arch Linux (Hyprland). The desktop (Linux) and browser versions work fine, but the Android and iOS versions fail to launch with the following ...
1
vote
0
answers
99
views
How to populate Avalonia ComboBoxItem from a ViewModel collection so it's not huge?
How do I add combo box items based on a view-model collection in Avalonia so that the combo box auto-sizes to the content? I've tried using a TextBlock inside an ItemRepeater's DataTemplate, but the ...
0
votes
0
answers
215
views
How to style avalonia datagrid headers?
I need to create style to Avalonia DataGrid that have rounded header and no vertical and horizontal separators. I`m trying to remove separators with this:
<DataGrid.Styles>
<Style ...
0
votes
0
answers
46
views
Unauthorized Access to file on Desktop in Avalonia app on macOS
We've got a macOS Avalonia problem when trying to package multiple builds for different cpu architectures in the same macOS .app bundle.
We are attempting to place the entire x64 and arm64 build ...
0
votes
1
answer
41
views
Use Drag and Drop or a filebrowser on macos .NET / C#
I'm writing an application using Avaloniaui. I'm pretty sure the question is for .NET in general, though.
I want the user to be able to specify an app that will be used to open certain file types. In ...
0
votes
1
answer
226
views
Avalonia is not showing correct app icon on MacOS
I have a problem with AvaloniaUI on MacOS, where the dock icon isn't what I have specified, it's always an exec icon like that.
Changing the icon file doesn't help at all. I checked it and it's a ...
0
votes
0
answers
70
views
How to interact with Avalonia application embeded into Angular application?
I'm learning the Avalonia framework and my goal was to embed it into an existing Angular application. To accomplish this, I used an iframe and passed the source to index.html generated by dotnet ...
0
votes
1
answer
182
views
How to use a LibVLCSharp.Avalonia.VideoView within an Avalonia.Controls.Viewbox?
My goal is to create different Avalonia UI applications for specific screen resolutions. For example 4k or some specific portrait orientation. During development, I would like to scale the GUI to ...
0
votes
0
answers
117
views
Avalonia `ContentControl` not loading the `DataTemplate`
I have two views, DeviceListView & LoadingView, that are present in LocateDeviceView like this:
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://...
1
vote
1
answer
763
views
How to only allow numbers (while typing) in a Numeric UpDown?
I'm trying to come up with a better approach for my other problem:
Avalonia: Get Numeric UpDown to parse the text on lost focus
In short: I'd like a TextBox that ignores non-numeric characters while ...