Attempts to get the value of a CSS custom property (CSS variable) defined on this element. Unlike TryGetAttribute(String, out String), this checks every specificity level in the style dictionary and returns the value with the highest specificity, making it suitable for resolving custom properties sourced from external stylesheets as well as inline styles.
public bool TryGetCustomProperty(string name, scoped out string value)
The custom property name, including the leading '--'.
The resolved value if found; otherwise null.
true if the custom property was found on this element; otherwise false.