Hi All,
Im making a custom button called "ShardButton" which uses a Style to control its content as well as its event triggers:
<Style x:Key="ButtonStyle" TargetType="{x:Type obj:ShardButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type obj:ShardButton}">
<Grid>
<Path .../>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="ButtonBase.Click">
!!!SOMETHING HERE!!!
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Im using the above XAML in the main Window1.xaml file, and creating a xmlns to the "obj" namespace, so what I want to do is to call a custom event handling method on the ShardButton class, how do I do that in XAML?
I cant seem to find the right way to phrase it for a Google search...
Thanks for any help you can give me!
Mark