Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Dynamic resource access inner property

$
0
0

I have the following Dynamic Resource:

public class Foo
{
     public string bar { get; set; }
}

I set my resource using:

Application.Current.Resources["Foo"] = myFoo;

But when I try to access my bar property it does not work:

<Image Source="{DynamicResource Foo.bar}" />

However using this approach works:

<Image BindingContext="{DynamicResource Foo}" Source="{Binding bar}" />

The problem is that the approach above can not be used when I can´t override my Binding. My question is, How can I access inner properties of a DynamicResource without override the BindingContext ?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>