avaloniaui SystemInvalidOperationExceptionCannot use a control as a Setter value Wrap the control in a Template
This error occurs when trying to use a control as a value for a Setter in AvaloniaUI, without wrapping it in a tag. A Setter is used to set the value of a property on a control, and it requires a valid value type.
To resolve this error, wrap the control in a tag. This will create a template for the control, which can then be used as the value for the Setter.
For example, instead of:
Use:
原文地址: https://www.cveoy.top/t/topic/dhmr 著作权归作者所有。请勿转载和采集!