all groups > visual studio .net debugging > november 2007 >
You're in the

visual studio .net debugging

group:

Catch Exception in XAML


Catch Exception in XAML Jen
11/2/2007 6:08:01 PM
visual studio .net debugging:
MouseEnter this button causes the <SoundPlayerAction> element throws
exception as I give it a relative path. What is the technique to catch an
exception when code in XAML?

Thanks,
Jen

<Button Name="btnPlayAudio" Click="btnPlayAudio" Content="Play" >
<Button.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<EventTrigger.Actions>
<SoundPlayerAction Source=".\Media\Sound.wav" />
</EventTrigger.Actions>
</EventTrigger>
</Button.Triggers>
AddThis Social Bookmark Button