fsharp.viewmodule

F# WPF: Handling click events in ListBox

好久不见. 提交于 2019-12-22 07:58:33
问题 I'm trying to create a simple task scheduler using F# and WPF. It's basically just a list of tasks where every task has a 'Delete' button. Handling button clicks outside of the list is not a problem -- this can be handled with a regular command. However handling a button click in the list item is not straightforward. I tried using RelayCommand described here with binding routed to parent, but the sender object is always null (I expected it to be the task object from the collection). Also

Closing a dialog with FSharp.ViewModule

只愿长相守 提交于 2019-12-12 12:15:54
问题 In my previous question "Enabling dialog OK button with FSharp.ViewModule", I got to the point where a dialog's OK button was enabled only when the validators for the dialog's fields were true, and ViewModule's IsValid property became true. But I ran into a couple more problems after that: 1) Clicking on the OK button didn't close the dialog, even if I set IsDefault="true" in XAML. 2) When the OK button is clicked, sometimes I want to do more checks than provided by the ViewModule validators

F# WPF: Handling click events in ListBox

走远了吗. 提交于 2019-12-05 14:14:49
I'm trying to create a simple task scheduler using F# and WPF. It's basically just a list of tasks where every task has a 'Delete' button. Handling button clicks outside of the list is not a problem -- this can be handled with a regular command. However handling a button click in the list item is not straightforward. I tried using RelayCommand described here with binding routed to parent, but the sender object is always null (I expected it to be the task object from the collection). Also tried attaching a property as recommended here , but couldn't make it work. How do I assign an event