Issue displaying a ReadOnlyObservableCollection on a canvas #21033
tomhornyak
started this conversation in
General
Replies: 1 comment
-
|
I would first try to use the DevTools to verify the bounds of the UI elements, check positioning of elements and clipping. See: https://docs.avaloniaui.net/tools/developer-tools/installation Maybe... the Canvas is just of size zero... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First off, I am a newbie to Avalonia - so be gentle :)
I am using Avalonia 11.3.12
I have a custom control which is composed of several Avalonia controls called "LabeledRtb". I am trying to display a collection of the controls on a grid. Here is a portion of my view model.
`public partial class MainWindowViewModel : ViewModelBase
{
private readonly SourceList _cards = new SourceList();
public readonly ReadOnlyObservableCollection _cardsList;
`
After calling AddCard, _cards, _cardsList, and CardsList all contain the card. But it is not displayed on the canvas.
Here is the axaml section where I try to display the items.
(For whatever reason , it wouldn't display properly without the blank lines.)
`
`
Thanks for reading this.
Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions