UI state management best practices RRS feed

  • Question

  • Hi,

    I'm building a Windows Forms application using Reactive Extensions, and am wondering how UI state should be best handled when, for example, the state of individual controls is based on multiple View Model properties, too many to be handled directly by an overload of WhenAnyValue? How can I "combine" all those properties into a single one? 

    If I create a new VM property returning the combined result, what is the recommended way of doing so? My assumption is that if I create a VM property with only a getter, then nothing will actually trigger the observable. Or should I somehow call that property's setter, and thus calling RaiseAndSetIfChanged every time one of the composing properties is set?

    What is the recommended way to combine multiple properties when there are too many to use WhenAnyValue?


    Luc Morin, T.P.

    Friday, August 10, 2018 4:48 PM