WPF应用程序,Slider缺少Thumb/Thumb.DragCompleted事件 [英] WPF Application, Slider is missing Thumb/Thumb.DragCompleted event

查看:376
本文介绍了WPF应用程序,Slider缺少Thumb/Thumb.DragCompleted事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将跟着有关如何在WPF应用程序中使用滑块的教程.我创建了一个滑块.本教程尝试告诉我重新放置滑块时的操作,以便它具有对象

I'm following along with a tutorial on how to use a slider in a WPF application. I created a slider. The tutorial tries to tell me what to do when a slider is repositioned so it has a object

Visual Studio的智能感知中根本没有显示"Thumb"属性,并在尝试设置Thumb.DragCompleted事件的子激发时注意到该错误:未找到可连接属性"DragCompleted"键入Thumb'.

The "Thumb" attribute doesn't show up at all in the intellisense of Visual Studio and note the error when I try to set what sub fires for the Thumb.DragCompleted event: "The attachable property 'DragCompleted' was not found in type Thumb'".

在属性"窗口中,没有任何关于THUMBS的讨论,甚至当我显示滑块的属性时,即使在滑块中事件列表中也没有显示DRAGCOMPLETED事件.

In the PROPERTIES window there isn't anything talking about THUMBS or even the Slider doesn't have the DRAGCOMPLETED event showing up in the list of events when I show the slider's properties.

如何告诉Visual Studio我要滑动滑块的拇指来使用为Thumb.DragCompleted事件编码的事件?我一定完全错过了有关THUMBS的明显信息,因为我已经搜索了此错误消息并发现绝对没有.

How do I tell visual studio that I wand the slider's thumb to use an event I've coded for the Thumb.DragCompleted event? I must be completely missing something obvious about THUMBS because I've searched for this error message and found absolutely NOTHING.

推荐答案

不用担心消息,只需键入<Slider Thumb.DragCompleted="Slider_DragCompleted"/>并运行即可.告诉您您是否无法运行代码.这些是已知问题,在某些情况下,VS会给您这样的设计时错误.但是在运行期间,这些错误不会增加.

Don't worry about the message, just type <Slider Thumb.DragCompleted="Slider_DragCompleted"/> and run. Tell if you are not able to run the code. These are known issues, in some of the cases VS gives you such design time errors. But during runtime these errors dont rise.

这篇关于WPF应用程序,Slider缺少Thumb/Thumb.DragCompleted事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆