WPF 应用程序,滑块缺少 Thumb/Thumb.DragCompleted 事件

WPF Application, Slider is missing Thumb/Thumb.DragCompleted event(WPF 应用程序,滑块缺少 Thumb/Thumb.DragCompleted 事件)

本文介绍了WPF 应用程序,滑块缺少 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

Thumb"属性根本没有出现在 Visual Studio 的智能感知中,当我尝试为 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'".

在 PROPERTIES 窗口中没有任何关于 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.

推荐答案

不用担心消息,只需键入 并运行.告诉您是否无法运行代码.这些都是已知问题,在某些情况下 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 应用程序,滑块缺少 Thumb/Thumb.DragCompleted 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:WPF 应用程序,滑块缺少 Thumb/Thumb.DragCompleted 事件

基础教程推荐