void OnAttachedPropertiesServiceAvailable(AttachedPropertiesService attachedPropertiesService) { this.isBreakpointEnabledProperty = new AttachedProperty<bool>() { Getter = (modelItem) => IsBreakpointOfType(modelItem, BreakpointTypes.Enabled), Name = "IsBreakpointEnabled", OwnerType = typeof(object) }; this.isBreakpointBoundedProperty = new AttachedProperty<bool>() { Getter = (modelItem) => IsBreakpointOfType(modelItem, BreakpointTypes.Bounded), Name = "IsBreakpointBounded", OwnerType = typeof(object) }; this.isBreakpointConditionalProperty = new AttachedProperty<bool>() { Getter = (modelItem) => IsBreakpointOfType(modelItem, BreakpointTypes.Conditional), Name = "IsBreakpointConditional", OwnerType = typeof(object) }; this.isCurrentLocationProperty = new AttachedProperty<bool>() { Getter = (modelItem) => IsCurrentLocation(modelItem), Name = "IsCurrentLocation", OwnerType = typeof(object) }; this.isCurrentContextProperty = new AttachedProperty<bool>() { Getter = (modelItem) => IsCurrentContext(modelItem), Name = "IsCurrentContext", OwnerType = typeof(object) }; attachedPropertiesService.AddProperty(isBreakpointEnabledProperty); attachedPropertiesService.AddProperty(isBreakpointBoundedProperty); attachedPropertiesService.AddProperty(isBreakpointConditionalProperty); attachedPropertiesService.AddProperty(isCurrentLocationProperty); attachedPropertiesService.AddProperty(isCurrentContextProperty); }
void OnAttachedPropertiesServiceAvailable(AttachedPropertiesService attachedPropertiesService) { this.validationStateProperty = new AttachedProperty<ValidationState>() { Getter = (modelItem) => GetValidationState(modelItem), Name = "ValidationState", OwnerType = typeof(object) }; attachedPropertiesService.AddProperty(this.validationStateProperty); this.validationMessageProperty = new AttachedProperty<string>() { Getter = (modelItem) => GetValidationMessage(modelItem), Name = "ValidationMessage", OwnerType = typeof(object) }; attachedPropertiesService.AddProperty(this.validationMessageProperty); }