HyperlinkButton in C# XAMARIN.FORMS

后端 未结 7 1486
南方客
南方客 2021-02-19 02:36

I want to create Label with click possibility like in WIN phone xaml


Is there a possibili

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 02:56

    I do this --> create the following class:

    public class ButtonAsLink : Button
    {
        public ButtonAsLink()
        {
            this.TextColor = Color.Blue;
            this.BackgroundColor = Color.Transparent;
            this.BorderWidth = 0;
        }
    }
    

    Then everywhere you need to create a link button use this:

    SendButton = new ButtonAsLink()
            {
                Text = "Send Logs...",
                VerticalOptions = LayoutOptions.Center
            };
    

提交回复
热议问题