tags:

views:

23

answers:

1

I am generating some Xaml based on some other source of input. In some cases I am generating x:Name values but they have invalid characters. I found this article on MSDN:

XamlName Grammar

Which describes the grammar of a x:Name tag but doesn't tell me how to actually apply this. Clearly there is some code to validate this name at runtime but what is the easiest way to actually fix up a string with invalid characters?

A: 

Turns out it made the most sense to just drop all of the x:Names and not generate them. We don't really need to dig around inside for particular elements afterall. We still have to generate file names and Class names but that's a bit easier of a problem I think.

justin.m.chase