简体   繁体   中英

Binding URL (http//image) imagebrush datatemplate WPF

Here is my XAML datatemplate:

<DataTemplate>
    <Ellipse Height="40" Width="40">
        <Ellipse.Fill>
            <ImageBrush ImageSource="{Binding Photo}" Stretch="UniformToFill"/>
        </Ellipse.Fill>
    </Ellipse>
</DataTemplate>

And my Photo Binding using local image with IP ex : 192.168.1.1/image/image.jpg

I tried call binding Photo but in my ListView my image did not appear.

如果您从本地网站获取图像,则应在路径中包含http://

public Uri Photo { get; } = new Uri("http://192.168.1.1/image/image.jpg");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM