Relative Content

Tag Archive for avaloniauiavalonia

ProgressBar doesn’t update when changing value in OnLoaded method

I have a window that shows when another process is completing. The other process sets a boolean flag when done – a function returning the status of this flag is passed to the window (this is the function referred to by _signalCompletedFunction). The window ‘winWait’ just shows a cycling progress bar (moves from 1 to 10 repeatedly while waiting). The problem is that the progress bar never updates. (Similar code works in WinForms where ‘OnLoaded’ is replaced by WinForms ‘OnActivated’, but the WinForms progress bar ‘Refresh’ method is also required – this method doesn’t exist in Avalonia).

Where is ContextMenuEventArgs?

I’m trying to code the ‘Opening’ event for a DataGrid.ContextMenu and examples I see online use an event handler method with a second parameter of type ContextMenuEventArgs, but I can’t find any Avalonia namespace containing this type.

Using a Maui Control in Avalonia

I am trying to use a ZXing Maui control to read a barcode using a mobile’s camera. It is activating the camera correctly but it is not reading the QR Code. My code is as follows: