Use it, love it, want more of it.
S
scottytk
@scottytk
Posts
-
LogMeIn -
Change WPF TextBox border when it has focusThis answer will upset the wpf-purists out there, but when time is money, try this: Instead of creating a ControlTemplate-Trigger nightmare, reduce the TextBox size with Margin="1" and BorderThickness="0". THEN, place the TextBox inside of Grid tags and place a in the Grid above TextBox. Example (with binding examples):
This code can be injected into a DataTemplate for a GridView or simply in a Window. Adding triggers to a simplified structure will prove easier than trying to override animations dependent on .Net version and operating system. I hate seeing my controls looking different on an XP system vs Win7, so this helps keep my projects looking clean on any display. Duct-tape solutions aren't always that bad!