This is a short post, but has one specific piece of information I want to keep.
Q: If you want to create a ControlTemplate to provide a custom style for a TextBox, how do you specify where the text goes when it’s used in WPF?
A: The answer was hidden in the depths of the MSDN Documentation. You have to include a <ScrollViewer> within your ControlTemplate with an x:Name value of “PART_ContentHost”.
Here’s a noddy example:




















One Response
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Continuing the Discussion