public LocalisedBindableString(LocalisedString text, IBindable <IResourceStore <string> > storage, IBindable <bool> preferUnicode) { this.text = text; this.storage.BindTo(storage); this.preferUnicode.BindTo(preferUnicode); this.storage.BindValueChanged(_ => updateValue()); this.preferUnicode.BindValueChanged(_ => updateValue(), true); }
/// <summary> /// Creates an <see cref="ILocalisedBindableString"/> which automatically updates its text according to information provided in <see cref="ILocalisedBindableString.Text"/>. /// </summary> /// <returns>The <see cref="ILocalisedBindableString"/>.</returns> public ILocalisedBindableString GetLocalisedString(LocalisedString original) => new LocalisedBindableString(original, currentStorage, preferUnicode);