Presenting information in the GUI
In this section, we'll look at ways of presenting information in a GUI which is updated on a regular basis. We'll use the MVC pattern to update the data.
In .NET, in general, the interface INotifyPropertyChanged
is used when the notification of an update is needed in the model. In this example, we'll use a DataGridView
control and a DataSource
that consists of a list with items of a custom type implementing the INotifyPropertyChanged
interface.
The updates to the model are handled by the controller and then the GUI is updated from the DataSource
itself. Let's start by looking at the list of orders and how to present that list of orders in the DataGridView
control. Add the following code to the GUI.fs
file:
let initOrderList() ...
Get F# for Quantitative Finance now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.