WPF does not support a Select property on the TextBox object. In order to get this functionality I found the following code:
Protected Overrides Sub OnStartup(e as StartupEventArgs) ' select the text in a TextBox when it receives focus: EventManager.RegisterClassHandler(GetType(TextBox), TextBox.PreviewMouseLeftButtonDownEvent, New MouseButtonEventHandler( AddressOf SelectivelyIgnoreMouseButton)) EventManager.RegisterClassHandler(GetType(TextBox), TextBox.MouseDoubleClickEvent, New RoutedEventArgs( AddressOf SelectAllText)) EventManager.RegisterClassHandler(GetType(TextBox), TextBox.GotKeyboardFocusEvent, New RoutedEventArgs( AddressOf SelectAllText)) myBase.OnStartUp(e) End Sub
The helper methods:
Private Sub SelectivelyIgnoreMouseButton(sender as Object, e As MouseButtonEventArgs) ' Find the TextBox Dim parent As DependencyObject = TryCast(e.OriginalSource, UIElement) While parent IsNot Nothing AndAlso Not (TypeOf parent Is TextBox) parent = VisualTreeHelper.GetParent(parent) End While If parent IsNot Nothing Then Dim textbox = DirectCast(parent, TextBox) If Not textbox.IsKeyboardFocusWithin Then ' If the text box is not yet focussed then give it focus and ' stop further processing of this click event. textbox.Focus() e.Handled = true End If End Sub private Sub SelectAllText(sender as Object, e as RoutedEventArgs) Dim textbox = TryCast(e.OriginalSource, TextBox) If textbox IsNot Nothing Then textBox.SelectAll() End If End Sub
It has been a couple of sessions with Glenn Middleton at Tattoo Tears in Caringbah since I last posted. Had a fair amount done on the back including the bamboo up the side and poking out from behind the tiger.
Next will be the rest of the bamboo and then the background shading. That will almost see the back finished – Yay!
Had a couple of extra dollars burning a hole in my pocket so I went to visit guess who? Yup, another few hours spent on the back job, mainly in the tender areas over the lower back. The colour is hard to see in the lotus, it will look better in a few days.
Anyone notice the latest inclusion?
All new work by Glenn at Tattoo Tears, Caringbah, NSW
And before I forget, Get your asses to the Sydney Tattoo Expo (was great last year)…
Latest bit of work on what is turning into a huge back piece. Managed to get the head coloured and started work on the rocks and lotus at the bottom. There is not a lot of meat above the spine down there and it took a little while to settle down. Still a long way to go…
As usual, great work by Glen Middleton at Tattoo Tears in Caringbah
A couple of days since the last sitting and the colours are really starting to show through. The yellow will be very bright.
One draw-back of being tattooed on the back is that it is difficult to look after, You cant reach everywhere to wash or rub in the cream.
Outstanding Ink by Glenn Middleton