visual studio 2010 - WPF : Space key problem when using a Custom Markup Extension in VS2010 -


we developed localization solution using custom markup extension in vs 2008.

at time, used way :

<textblock text={utilswpf:intl key=objectname.propertyname, defaulttext=default name} /> 

(notice space in defaulttext). (notice how text-color tool of stackoverflow changes color of words well).

but works fine , compiles without problem.

in vs 2010 though, whenever try type space using way of implementing markup extension, ide adds comma you, gives :

<textblock text={utilswpf:intl key=objectname.propertyname, defaulttext=default, name} /> 

of course, doesn't compile anymore...

one solution implement markup extension other way :

<textblock>     <textblock.text>        <utilswpf:intl key="objectname.propertyname", defaulttext="default name"/>     </textblock.text> </textblock> 

but adds lot of lines , don't have 1 textblock can imagine...

another solution not type space, copy space , paste (which still compiles in vs 2010 quite crude).

as see it, our solution isn't best practice.

what kind of best practice advise able type spaces without inconvenience?

thanks insights.

try using single quotes:

<textblock text="{utilswpf:intl key=objectname.propertyname, defaulttext='default name'}" />  

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -