Provides comprehensive validation for visual and logical trees.
public class TreeValidator
kind:method, kind:property, kind:ctor. Press Esc to clear.FailuresGets the failed validation results.IsValidGets whether all validations passed.ResultsGets the validation results.AssertValid()Throws if any validations failed.Create()Creates a new tree validator.Custom(String, Func<Visual, Boolean>)Adds a custom validation rule.ForbidPattern(String)Forbids a specific pattern from existing.ForbidType<T>()Forbids a specific type from existing.GetSummary()Returns a summary of the validation results.RequireChildOf(String, String)Requires that a control is a descendant of another.RequireClass(String, String)Requires that a control has a specific style class.RequireEnabled(String)Requires that a named control is enabled.RequireExactCount<T>(Int32)Requires that exactly the specified count of a type exists.RequireMaxCount<T>(Int32)Requires that no more than the specified count of a type exists.RequireMinCount<T>(Int32)Requires that at least the specified count of a type exists.RequireName(String)Requires that a control with the specified name exists.RequireNameOfType<T>(String)Requires that a named control is of the specified type.RequireNames(String[])Requires that controls with all specified names exist.RequirePattern(String)Requires that a specific tree structure pattern exists.RequireProperty<TValue>(String, AvaloniaProperty<TValue>, TValue)Requires that a named control has a specific property value.RequireType<T>()Requires that at least one control of the specified type exists.RequireVisible(String)Requires that a named control is visible.ValidateLogicalTree(ILogical)Validates the logical tree against all configured rules.ValidateVisualTree(Visual)Validates the visual tree against all configured rules.