-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview 8 #304
Conversation
* Start updating to Avalona 11 preview 7 * Try to get the diagnostics lib building * Remove [Obsolete] from ViewBuilder.Create --------- Co-authored-by: Richard Webb <richard.webb@helpsystems.com>
@Numpsy everything builds now 🎉 |
…were replaced with `offset` in preview 7
I wasn't clear about what the ItemsControl itmes changed event should be bound to, as I thought I'd read that it can be used with an items collection without setting ItemsSource to a value, but i'm not entirely clear on the relationship between the two :-( On a positive note, the menu flyout example in the control catalog app was showing an empty dropdown with the preview 6 build, and that looks to have been fixed in the update |
This fires every time the button is clicked, but as you say it does not work if Component (fun ctx ->
let toggle = ctx.useState false
let items = ctx.useState<IEnumerable> [ 0 .. 10 ]
DockPanel.create [
DockPanel.children [
Button.create [
Button.dock Dock.Bottom
Button.onClick (fun _ ->
if toggle.Current then
items.Set [ 0 .. 10 ]
else
items.Set [ 'A' .. 'C' ]
toggle.Set (not toggle.Current)
)
Button.content "change items"
Button.horizontalAlignment HorizontalAlignment.Stretch
]
ItemsControl.create [
ItemsControl.onItemsChanged (fun _ -> printfn "Items changed!")
ItemsControl.dataItems items.Current
]
]
]
)
Nice! |
No description provided.