问题描述
我有一个转换器,其属性为VisibleLength
%U410
在App.xaml中,我将资源定义为
public class BoolToGridLengthConverter : IValueConverter
{
public object Convert(object value,Type targetType,object parameter,CultureInfo culture)
{
return ((bool)value == true) ? new GridLength(0) : new GridLength(VisibleLength);
}
public object ConvertBack(object value,CultureInfo culture)
{
return null;
}
public double VisibleLength { get; set; }
}
并在xaml中用作
<Application.Resources>
<ns:BoolToGridLengthConverter
x:Key="boolToGridLengthConverter"
/>
</Application.Resources>
我如何使用该属性将VisibleLenght property = doubleValue传递给xaml的转换器。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)