相关疑难解决方法(0)

Custom attached events in WPF

I might be getting the terminology wrong here, but I think I'm trying to create an attached event.

In the Surface SDK, you can do things like:

<Grid Background="{StaticResource WindowBackground}" x:Name="Foo" s:SurfaceFrameworkElement.ContactChanged="Foo_ContactChanged"/>
Run Code Online (Sandbox Code Playgroud)

I want to create a custom event for which a handler can be added in XAML in the same way, but I'm having trouble.

I can create a custom routed event, but the XAML intellisense doesn't see it and the event handler isn't added if I just type …

c# wpf events routed-events attachedbehaviors

5
推荐指数
1
解决办法
9218
查看次数

标签 统计

attachedbehaviors ×1

c# ×1

events ×1

routed-events ×1

wpf ×1