您当前的位置: 首页 > 

君子居易

暂无认证

  • 1浏览

    0关注

    210博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

WPF数据绑定的时候用Converter总是显示NullReferenceException: 未将对象引用设置到对象的实例

君子居易 发布时间:2022-02-24 11:39:29 ,浏览量:1

原因不明,

解决方案:添加try catch就可以

 object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)         {             string currentValue= "";             try             {                                }             catch (Exception ex)             {                              }             return currentValue;         }

关注
打赏
1660814979
查看更多评论
立即登录/注册

微信扫码登录

0.1087s