-
Beta Was this translation helpful? Give feedback.
Answered by
JaggerJo
Jun 30, 2023
Replies: 1 comment 3 replies
-
Use ListBox.create [
Grid.row 0
ListBox.viewItems [
for item in state.Items do
Grid.create [
Grid.columnDefinitions "Auto,*"
Grid.children [
TextBlock.create [
Grid.column 0
TextBlock.text item.Value.Name
]
ProgressBar.create [
Grid.column 1
ProgressBar.minimum 0.0
ProgressBar.maximum 1.0
ProgressBar.value item.Value.ProgressStatus
ProgressBar.horizontalAlignment HorizontalAlignment.Stretch
ProgressBar.showProgressText true
]
]
]
]
] |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
marklam
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
viewItems
instead ofdataItems
. When usingdataItems
all of Avalonia's binding and template mechanics kick in. This is sometimes what you want when you have large observable lists, ...