public CustomFontTestViewModel(INavigationService navigationService) { InputText = new ReactiveProperty <string>().SetValidateAttribute(() => this.InputText); InputError = InputText.ObserveErrorChanged .Select(x => x?.Cast <string>()?.FirstOrDefault()) .ToReadOnlyReactiveProperty(); SectionToggleCommand = InputText.ObserveHasErrors.Select(x => !x).ToAsyncReactiveCommand(); SectionToggleCommand.Subscribe(async _ => { InputSectionVisible.Value = !InputSectionVisible.Value; await Task.Delay(250); }); ToProfileCommand.Subscribe(async _ => { await navigationService.NavigateAsync("DummyPage"); }); foreach (var item in languages) { ItemsSource.Add(new Person() { Name = item, Age = 1 }); } SelectedItems.Add(ItemsSource[1]); SelectedItems.Add(ItemsSource[2]); SelectedItems.Add(ItemsSource[3]); IsHeaderFont.Subscribe(o => { HeaderFont.Value = o ? "Anzu" : null; }); IsFooterFont.Subscribe(o => { FooterFont.Value = o ? "Anzu" : null; }); IsParentTitle.Subscribe(o => { ParentTitle.Value = o ? "Anzu" : null; }); IsParentValue.Subscribe(o => { ParentValue.Value = o ? "Anzu" : null; }); IsParentDesc.Subscribe(o => { ParentDesc.Value = o ? "Anzu" : null; }); IsParentHint.Subscribe(o => { ParentHint.Value = o ? "Anzu" : null; }); IsTitle.Subscribe(o => { Title.Value = o ? "" : null; }); IsValue.Subscribe(o => { Value.Value = o ? "" : null; }); IsDesc.Subscribe(o => { Desc.Value = o ? "" : null; }); IsHint.Subscribe(o => { Hint.Value = o ? "" : null; }); IsParentBold.Merge(IsParentItalic).Subscribe(o => { if (IsParentBold.Value && IsParentItalic.Value) { ParentAttr.Value = FontAttributes.Bold | FontAttributes.Italic; } else if (IsParentBold.Value) { ParentAttr.Value = FontAttributes.Bold; } else if (IsParentItalic.Value) { ParentAttr.Value = FontAttributes.Italic; } else { ParentAttr.Value = FontAttributes.None; } }); IsBold.Merge(IsItalic).Subscribe(o => { if (IsBold.Value && IsItalic.Value) { ChildAttr.Value = FontAttributes.Bold | FontAttributes.Italic; } else if (IsBold.Value) { ChildAttr.Value = FontAttributes.Bold; } else if (IsItalic.Value) { ChildAttr.Value = FontAttributes.Italic; } else { ChildAttr.Value = FontAttributes.None; } }); }
public bool Equals(ContentTypeProperty input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( RootPropertyName == input.RootPropertyName || (RootPropertyName != null && RootPropertyName.Equals(input.RootPropertyName)) ) && ( ReadableName == input.ReadableName || (ReadableName != null && ReadableName.Equals(input.ReadableName)) ) && ( Value == input.Value || (Value != null && Value.Equals(input.Value)) ) && ( PropertyDescription == input.PropertyDescription || (PropertyDescription != null && PropertyDescription.Equals(input.PropertyDescription)) ) && ( Localizable == input.Localizable || (Localizable != null && Localizable.Equals(input.Localizable)) ) && ( Fallback == input.Fallback || (Fallback != null && Fallback.Equals(input.Fallback)) ) && ( Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled)) ) && ( Order == input.Order || (Order.Equals(input.Order)) ) && ( Visible == input.Visible || (Visible != null && Visible.Equals(input.Visible)) ) && ( IsTitle == input.IsTitle || (IsTitle != null && IsTitle.Equals(input.IsTitle)) ) && ( Required == input.Required || (Required != null && Required.Equals(input.Required)) ) && ( MaxLength == input.MaxLength || (MaxLength.Equals(input.MaxLength)) ) && ( MaxByteLength == input.MaxByteLength || (MaxByteLength.Equals(input.MaxByteLength)) ) && ( MaxFileSize == input.MaxFileSize || (MaxFileSize.Equals(input.MaxFileSize)) ) && ( Regexp == input.Regexp || (Regexp != null && Regexp.Equals(input.Regexp)) ) && ( ValidateAs == input.ValidateAs || (ValidateAs != null && ValidateAs.Equals(input.ValidateAs)) ) && ( RssAttribute == input.RssAttribute || (RssAttribute != null && RssAttribute.Equals(input.RssAttribute)) ) && ( VisibleDependency == input.VisibleDependency || (VisibleDependency != null && VisibleDependency.Equals(input.VisibleDependency)) ) && ( VisibleOn == input.VisibleOn || (VisibleOn != null && VisibleOn.Equals(input.VisibleOn)) ) && ( Datatype == input.Datatype || (Datatype != null && Datatype.Equals(input.Datatype)) ) && ( Attributes == input.Attributes || (Attributes != null && Attributes.SequenceEqual(input.Attributes)) ) && ( ChildProperties == input.ChildProperties || (ChildProperties != null && ChildProperties.SequenceEqual(input.ChildProperties)) ) && ( ContentTypeAllowed == input.ContentTypeAllowed || (ContentTypeAllowed != null && ContentTypeAllowed.Equals(input.ContentTypeAllowed)) ) && ( BindToProperty == input.BindToProperty || (BindToProperty != null && BindToProperty.Equals(input.BindToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( RepresentationSelection == input.RepresentationSelection || (RepresentationSelection != null && RepresentationSelection.SequenceEqual(input.RepresentationSelection)) ) && ( DefaultValues == input.DefaultValues || (DefaultValues != null && DefaultValues.SequenceEqual(input.DefaultValues)) ) && ( IsExternalAllowed == input.IsExternalAllowed || (IsExternalAllowed != null && IsExternalAllowed.Equals(input.IsExternalAllowed)) ) && ( PropertySection == input.PropertySection || (PropertySection != null && PropertySection.Equals(input.PropertySection)) ) && ( Weight == input.Weight || (Weight.Equals(input.Weight)) ) && ( Entitytype == input.Entitytype || (Entitytype != null && Entitytype.Equals(input.Entitytype)) ) && ( IsCombo == input.IsCombo || (IsCombo != null && IsCombo.Equals(input.IsCombo)) ) && ( SuppressProperty == input.SuppressProperty || (SuppressProperty != null && SuppressProperty.Equals(input.SuppressProperty)) ) && ( LegalContentTypes == input.LegalContentTypes || (LegalContentTypes != null && LegalContentTypes.SequenceEqual(input.LegalContentTypes)) ) && ( RepresentationValidationString == input.RepresentationValidationString || (RepresentationValidationString != null && RepresentationValidationString.Equals(input.RepresentationValidationString)) ) && ( MinWidth == input.MinWidth || (MinWidth.Equals(input.MinWidth)) ) && ( MaxWidth == input.MaxWidth || (MaxWidth.Equals(input.MaxWidth)) ) && ( MinHeight == input.MinHeight || (MinHeight.Equals(input.MinHeight)) ) && ( MaxHeight == input.MaxHeight || (MaxHeight.Equals(input.MaxHeight)) ) && ( IsVideo == input.IsVideo || (IsVideo != null && IsVideo.Equals(input.IsVideo)) ) && ( IsImage == input.IsImage || (IsImage != null && IsImage.Equals(input.IsImage)) )); }