How to specify that a static type converter should be used?

JohnHardmanJohnHardman GBUniversity mod

I know that when I use SetBinding I can specify an instance of a value converter, which of course can be a static instance. However, I am just re-factoring some code and am wondering how in the following code, the
can be changed to specify that a static instance of ImageSourceConverter be used. Is there a way to do this?

    public static readonly BindableProperty SourceProperty = BindableProperty.Create(
        propertyChanged: (bindable, oldvalue, newvalue) => ((VisualElement)bindable).ToString());

    public ImageSource Source
        get { return (ImageSource)GetValue(SourceProperty); }
        set { SetValue(SourceProperty, value); }

Best Answer


Sign In or Register to comment.