Surfin Bird
Surfin Bird

Reputation: 488

Visual Studio replaces curly quotes by straight ones in XAML attributes

If there is some way to prevent it? Even if managed to input something, it's getting replaced while Auto-Formatting.

I could use things like ““”, but it's not very comfortable (I use an app which allows to input those symbols using simple keyboard shortcuts; also, of course, readability of source code would be decreased).

Upvotes: 0

Views: 42

Answers (1)

Amaury Levé
Amaury Levé

Reputation: 1512

If you really want to avoid the ““” notation, you can avoid the auto-formatting either by using a Resx or by avoid using the inline property.

Resx:

<TextBlock Text="{x:Static resx:Resources.MyQuotedText}" />

Full property:

<TextBlock>
    <TextBlock.Text>“Something“</TextBlock.Text>
</TextBlock>

Upvotes: 1

Related Questions