RunicMenu class

Namespace Runic.Application.Views in Runic.Application.Views 0.23.0

public static class RunicMenu

Asks the hosts to read the menu bar's state of Windows again.

Remarks

The host follows only the root ViewModel's INotifyPropertyChanged.PropertyChanged to read IRunicMenuCheckedSource.IsMenuItemChecked again. When a check mark depends on other state, such as a child ViewModel's property or a setting outside the ViewModel, call RunicMenu.Refresh with the root ViewModel, or RunicMenu.RefreshAll, after that state changed. Either may be called on any thread; the host reads the answers in the ViewModel's next model turn, once for any number of requests before it.

Methods

Refresh

public static void Refresh(object viewModel)

Reads the check marks of the Windows whose root ViewModel is viewModel again.

Parameters

viewModel

A Window's root ViewModel that implements IRunicMenuCheckedSource; another object does nothing.

Exceptions

ArgumentNullException

viewModel is null.

RefreshAll

public static void RefreshAll()

Reads the check marks of every open Window again.