[英]Xamarin forms - Underline Label with binding
我是learnig xamarin,我想將一些屬性綁定到標簽
我已經設法使用像這樣的模型來處理 IsVisible、TextColor 和 Text porprety:
public Color MyLabelColor { get; set; } = Color.FromHex("#ff6465");
public string LabelText { get; set; }
public bool LabelIsVisibleOrNot { get; set; } = false;
And bind the like this:
IsVisible="{Binding MyLabelColor}"
Text="{Binding LabelText}"
TextColor="{Binding MyLabelColor }"
我想綁定標簽屬性: TextDecorations="Underline, Strikethrough"
謝謝你的幫助
TextDecorations是一個枚舉
public TextDecorations Decoration { get {
return TextDecorations.Underline & TextDecorations.Strikethrough; } }
<Label Text="{Binding Subject}" TextDecorations="{Binding Decoration}" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.