Created
August 13, 2018 07:36
-
-
Save namhnz/a7ab6eb6be242d1ae560c65cc1adeff0 to your computer and use it in GitHub Desktop.
Hướng dẫn cách bind Image trong WPF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Với Image thì chúng ta có thể sử dụng đoạn code như sau để bind Image trong XAML với một url trong code-behind: | |
<Image Source="{Binding Url}" /> | |
Để có thể load hình ảnh bất đồng bộ chúng ta thêm thuộc tính IsAsync="True": | |
<Image Source="{Binding Url, IsAsync=True}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment