在资源字典中设置listboxItem的鼠标左击的事件样式。
打出这段代码提示“ResourceDictionary”根元素需要 x:Class 特性来支持 XAML 文件中的事件处理程序。请移除 MouseLeftButtonDown 事件的事件处理程序,或将 x:Class 特性添加到根元素。 ”错误,
这句话是什么意思?难道EventSetter 不能在资源字典中写?
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1">
<Style x:Key="remenber" TargetType="{x:Type ListBoxItem}" >
<Setter Property="Margin" Value=