I want to create Label with click possibility like in WIN phone xaml
Is there a possibili
If you want stylish the button (make it like hyperlink - with underline) you would like to implement the custom renderer:
Add this to xamarin.project
using Xamarin.Forms;
namespace xamarin.Mobile.Controls
{
public class HyperlinkButton : Button
{
public HyperlinkButton()
{
}
}
}
And implementation the renderer to IOS project:
using System.ComponentModel;
using xamarin.Mobile.IOS;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(xamarin.Mobile.Controls.HyperlinkButton), typeof(HyperlinkButtonRenderer))]
namespace xamarin.Mobile.IOS
{
public class HyperlinkButtonRenderer : ButtonRenderer
{
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (Control != null)
{
//Set attribute for underlineing information links
var underlineAttr = new UIStringAttributes { UnderlineStyle = NSUnderlineStyle.Single };
Control.SetAttributedTitle(new NSAttributedString(Control.CurrentTitle, underlineAttr), UIControlState.Normal);
}
}
}
}
I added renderer for iOS only. If you want to support another versions - you have to add renderers to this platforms.
And use it at xcml like this: