I am using MVVM model in my silverlight(windows phone)application.I have a textblock in my view called "Status".This textblock will display the status of the transaction.If user is not registered then it shows the message "You are not registered with us.Please register here".The word "here" should be a hyper link.If user is registered with us then we say "Last logged in at xx-xx-xxxx"...
My View.xaml has:
<TextBlock Name="lblStatusValue"
Text="{Binding Status}"
TextWrapping="Wrap" FontSize="23"
/>
ViewModel.cs has a property defined for the binding of the baove control.
private string _Status;
public string Status
{
get { return _Status; }
set
{
if (value != _Status)
{
_Status = value;
RaisePropertyChanged("Status");
}
}
}
Is that possible to select a particular word and make it as hyper link in any message we want to display ?Since I am using MVVM model I don't how to add the objects at runtime ( I tried this with Run control in hyperlink but in MVVM how do we achieve this ?)
Is it I have to add code like below in View.cs, and not possible to do it from the ViewModel.cs ?