WPF Application, Slider is missing Thumb/Thumb.DragCompleted event

我的梦境 提交于 2019-12-02 10:12:56

问题


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

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'".

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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/33182761/wpf-application-slider-is-missing-thumb-thumb-dragcompleted-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!