How cand I Bind an string inside SvgImage markup ? #170
Unanswered
cesarchefinho
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How cand I Bind an string inside SvgImage markup ?
< Image Height="15" Source="{SvgImage {Binding Idioma.Svg} }" / >
public class IdiomaType
{
public string Name { get; set; } = "";
public string Sigla { get; set; } = "";
public string Svg { get; set; } = "";
}
public partial class MainViewModel : ObservableValidator
{
[ObservableProperty]
public IdiomaType idioma = new IdiomaType
{
Name = "Português",
Svg = "/Assets/pt-BR.svg",
Sigla = "pt-BR"
};
}
Can someone help and say what am i doing wrong ?
I am geting this error
Unable to convert Avalonia.Markup:Avalonia.Data.Binding to System.Runtime:System.String for constructor of Avalonia.Svg.Skia:Avalonia.Svg.Skia.SvgImageExtension
thanks
Beta Was this translation helpful? Give feedback.
All reactions