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

help me !!!!!!!! Xaml Binding ImageSource den't work

$
0
0

my xaml code

<ListView ItemsSource="{x:Static local:MyData.ImageCollection}">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <ImageCell ImageSource="{Binding URLs}">
                                            </ImageCell>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>

image in xxxx.Droid/Resources/drawable/test.jpg

ImageCollection here:

public class MyImageSource
    {
        public MyImageSource(string sources)
        {
            this.URLs = sources;
        }
        public string URLs { get; set; }
    }
    public static class MyData
    {
        static MyData()
        {
            MyImageSource[] Sources = new MyImageSource[] { 
                new MyImageSource("test.jpg"),
                new MyImageSource("test.jpg"),
                new MyImageSource("test.jpg"),
                new MyImageSource("test.jpg")
            };
        }
        public static MyImageSource[] ImageCollection { get; set; }
    }

How can I achieve this function. ListView Binding ImageCell and Image Resource In the cloud .it's dynamic data

e.....My English is not good!sorry


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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