Hi to everybody!
I have the next trouble.
In my WPF application I have some ResourceDictionaries( TextBoxStyle, CheckBoxStyle... and others) and a global ResouceDictionary (ResourceLibrary) where I merge the rest of the ResourceDictionaries.
In my app.xaml I have this xaml code:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Application;component/ResourceDictionaries/ResourceLibrary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Hitherto, all the styles have been working perfectly, but now I want to add a PreviewMouseLeftButtonDown event to all TextBoxes in my app so I tried to add this code
<EventSetter Event="MouseLeftButtonDown" Handler="TextBlockMouseLeftButtonDown" />
at TextBoxStyle ResourceDictionary.
What else is needed to make this work? Where I have to add the code for the event? In a new class?
Thanks for all!!