Reputation: 2097
I want to show myLabel in double quotes like "MyTestString".Iam using following content string format.Please correct me ,its not showing in quotes.
<Label ContentStringFormat="\"{0}\"" Content="{Binding MyLabel}"
Foreground="WhiteSmoke" FontWeight="Medium" FontSize="20"/>
Upvotes: 1
Views: 1809
Reputation: 4040
You have to remove the slashes:
<Label ContentStringFormat=""{0}"" Content="{Binding MyLabel}"
Foreground="WhiteSmoke" FontWeight="Medium" FontSize="20"/>
But why don't you add your quotes when you get MyLabel
from your model?
private string myLabel;
public string MyLabel
{
get
{
return "\"" + this.myLabel + "\"";
}
}
EDIT
Even with slashes it shows double quotes.
Upvotes: 3
Reputation: 7601
You shoule use
<TextBlock Text='You shouldn't choose "Copy if New":'/>
Upvotes: 1