滚动条滑块 [英] Scrollbar Slider

查看:102
本文介绍了滚动条滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Windows 10制作自定义滚动条。

I am making a custom scrollbar for Windows 10.

在Windows 10中,对于滚动条滑块,没有中心线(中间有垂直滚动条的3条水平线)。我必须在滚动条的模板中添加它们。 

In Windows 10 , for scrollbar slider there is no center lines (3 horizontal lines for vertical scrollbar in middle). I have to add them in template for scrollbar . 

我的问题是如何让它消失并在滑块中出现中心线而没有代码,只有xaml。

My question is how do i make it disappear and appear center lines in slider without code behind and only with xaml.

谢谢,

Madhu

Madhusudhan SM

Madhusudhan SM

推荐答案

如果要更改任何控件的外观,可以将该控件的实例添加到窗口中,设计师右键单击控件,然后在上下文菜单中选择编辑模板/编辑副本。

If you want to change the appearance of any control you can add an instance of that control to a window, in the designer right click the control and in the context menu select Edit Template / Edit a copy.

这将为您提供该控件的XAML。 然后,您就可以编辑要更改的控件的任何部分。 确保您不更改生成的代码中的任何控件的名称,或者结果可能是
控件根本不起作用。

This will give you the XAML for that control.  You will then be able to edit whatever parts of the control you wish to change.  Make sure you don't change the names of any of the controls within the code that is generate or the result may be that the control will not work at all.

我建议你创建一个新窗口,仅仅是为了获取控件模板。

Also I would suggest you create a new window solely for the purpose of getting the control template.

滚动条的结果大约是150行,祝你好运。

The result for a scrollbar is about 150 lines so good luck.


这篇关于滚动条滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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