I am building a string in which I have to hide an email address.
string StatusText = "Please reach out here for access."
Just wanted to know how can we hide an email address in a string. I'd like the "here" to be an email address. I have to bind StatusText to a Textblock such that when user clicks on "here", the outlook mail should open.
Here's the detailed code:
View.xaml
<TextBlock Text="{Binding StatusText}" />
ViewModel.cs
private string _statusText;
public string StatusText
{
get { return _statusText; }
set { SetProperty(ref _statusText, value); }
}
DisplayMessages()
{
//based on the boolean value, Status Text is set
//When the case is "NoAccess", I want the "here" of StatusText to be clickable and show the mailaddress as abc@abc.com
switch(Flag)
case IsReady:
StatusText = "Application is Ready";
break;
case NoAccess:
StatusText = "Please reach out here. No access can be provided."
break;
}