-1
var b=new Binding();
b.Source=myobj;
b.Path=new PropertyPath("Text",myParameter);//<-- myParemter is int value
b.Converter=new FollConverter();
control.SetBinding(UserControl.VisibilityProperty,b);

in my converter

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if(parameter!=null)  //<-- PROBLEM IS HERE, ALWAYS NULL
}

How to transfer object in dynamic binding?

H.B.
  • 166,899
  • 29
  • 327
  • 400
ebattulga
  • 10,774
  • 20
  • 78
  • 116

1 Answers1

2

That ain't how you use converter paramters, this PropertyPath contstructor has nothing to do with that paramter in Convert.

b.Path = new PropertyPath("Text");
b.ConverterParameter = myParamter;
H.B.
  • 166,899
  • 29
  • 327
  • 400