Any ETA on this ???
@assassin316, if you have the time and willingness to help out then it'll happen sooner. The team has reserved time in every sprint to mentor folks on how to contribute features to Uno. Let me know if you are keen.
I don't understand, looks like this has been merged in #901, wasn't it?
@weitzhandler No, that sample simply shows what features are working with x:Bind and what doesn't work with MarkupExtension. When you run it, it'll show "feature not supported" for MarkupExtension when running in Android and iOS (as well as "feature not supported" for x:Bind on functions).
Oh I see.
Well @ghuntley what does it take to implement this feature? I believe it's in the XAML parser isn't it? Can we import it from WPF now that's it's been open sourced?
Very compelling feature. Many of my converters are declared as Markup extensions (for example: IsEnabled="{Binding IsBusy, Converter={c:BooleanConverter Switch=True}}").
I agree, MarkupExtensions can open up more possibilities for developers to customize their xaml.
@weitzhandler Can you provide me the code for one of your converters? For example, the BooleanConverter in your sample above, I'd like to make sure that we handle that type of scenario. Thanks!
@weitzhandler agree with @Massimo37 I didn't realize you could do converters with markup extensions 馃帀, I thought you would at least still have needed the bits they hadn't implemented yet from WPF for that. I totally want to convert all our Toolkit ones now... almost...
This WPF example looked pretty simple, so I tried something similar out quick... That turned into a long fight with VS on how to escape character in XAML, which turned into a VS bug here. 馃槖
Finally though, I made my new BooleanToTextConverter work! But only when using Binding; x:Bind seems to assume it should be looking for a static resource for Converter and throws an exception at run-time. 馃槖
馃 As for other samples, I have this sample one and we had added some in the toolkit as well.
FYI @LyalinDotCom @jevansaks
@michael-hawker I was unable to repro your x:Bind issue you mentioned, I copied your converter and tried it with an x:Bind and it worked without error. 馃え
@massimo37 strange, I'm on 18362 and get this error at runtime:
System.Runtime.InteropServices.COMException: Unspecified error
Error: Resource Dictionary Key can only be String-typed or Type-typed values.
at System.Runtime.InteropServices.WindowsRuntime.IMap`2.Lookup(K key)
at System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Lookup[K,V](IMap`2 _this, K key)
at System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Indexer_Get[K,V](K key)
at MarkupExtensionTest.MainPage.MainPage_obj1_Bindings.LookupConverter(String key
@michael-hawker Can you provide me with a sample project that produces this error?
Just change the 2nd binding in my gist above to this:
<TextBlock Text="{x:Bind MyToggle.IsOn, Converter={local:BooleanToTextConverter TrueText=Hello\, I\'m True!, FalseText='Not True!'}}"/>
Thanks, I'll report back once I have something 馃憤