【发布时间】:2019-06-24 09:35:59
【问题描述】:
我需要从依赖属性的 PropertyChangedCallback 调用异步方法。
我的依赖属性:
public static readonly DependencyProperty SetTextProperty =
DependencyProperty.Register("SetText",
typeof(string),
typeof(UserControl1),
new PropertyMetadata("",
new PropertyChangedCallback(OnSetTextChanged)));
private async Task OnSetTextChanged()
{
//// My implementations.
}
【问题讨论】:
-
有什么问题?你得到什么错误?你需要更具体一点。
-
@iSpain17 显示错误的返回类型错误。
标签: c# wpf dependency-properties