当前位置:网站首页>Controltemplate in WPF
Controltemplate in WPF
2022-06-11 00:58:00 【Nidhogg_ com】
WPF Medium ControlTemplate
WPF Contains data templates and control templates , The control template also includes ControlTemplate and ItemsPanelTemplate, Let's talk about ControlTemplate.
Actually WPF Each control of the has a default template , This template describes the appearance of the control ( Visual tree ) as well as The response of appearance to external stimuli ( trigger ). We can customize a template to replace the control Default templates to create personalized controls .
And Style Different ,Style Only the existing property values of the control can be changed ( Such as color font ) To customize the controls , But the control module The board can change the internal structure of the control (VisualTree, Visual tree ) To complete more complex customization , For example, we can To customize such buttons : It displays a small icon in the left part and text in the right part . want Replace the template of the control , We just need to declare one ControlTemplate object , And ControlTemplate Yes Like making corresponding configuration , Then the ControlTemplate Object assigned to the control Template Properties will do .
ControlTemplate Contains two important properties :
1, VisualTree, The visual tree of the template , In fact, we use this property to describe the appearance of the control
2, 2, Triggers, Trigger list , It contains some triggers Trigger, We can customize this trigger column Table to make the control respond to external stimuli , For example, the text becomes bold when the mouse passes .
Blend for Visual Studio summary Blend for Visual Studio
Can be used to design based on XAML Of Windows and Web Applications . It provides And Visual studio Same basic XAML Design experience , And added a visual designer , For senior positions service , Such as animation and behavior . of Blend and Visual Studio Comparison between , Please refer to at Visual Studio and Blend for Visual Studio Middle design XAML.
Blend for Visual Studio yes Visual Studio A component of . If you want to install Blend, Please be there. Visual Studio In setup , choice “ Universal Windows Platform development ” or “.NET Desktop development ” The workload . These two Both workloads include Blend for Visual Studio Components .
边栏推荐
- 大厂是面对深度分页问题是如何解决的(通俗易懂)
- B 树的简单认识
- [network planning] 2.1.2 transport layer services that can be selected by the application
- System interpretation: Authority Design Guide
- Golang中的深拷贝与浅拷贝
- Why web development with golang
- 海贼oj#148.字符串反转
- AQS explanation of concurrent programming
- 扎实的基础知识+正确的方法是快速阅读源码的关键
- Automated test series
猜你喜欢

阻塞隊列 — DelayedWorkQueue源碼分析

What exactly does Devops mean?

What is thread in concurrent programming

compiler explorer

C语言实现设置桌面壁纸

海贼oj#148.字符串反转

Philips coo will be assigned to solve the dual crisis of "supply chain and product recall" in the face of crisis due to personnel change

团队管理|如何提高技术Leader的思考技巧?

MESI cache consistency protocol for concurrent programming
![[network planning] 2.2.4 Web cache / proxy server](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network planning] 2.2.4 Web cache / proxy server
随机推荐
SLAM卡尔曼滤波&&非线性优化
[network planning] 2.1.2 transport layer services that can be selected by the application
微信小程序实现OCR扫描识别
对象作为点(Objects as Points) 个人总结
QT thread and interface
Deploy netron services through kubernetes and specify model files at startup
LeetCode 8. 字符串转换整数 (atoi)(中等、字符串)
87.(leaflet之家)leaflet军事标绘-直线箭头修改
【NVIDIA驱动的顽固问题】---- /dev/sdax:clean,xxx/xxx files,xxx/xxx blocks ---- 最全解决方法
Solid basic knowledge + correct method is the key to quickly read the source code
Lucene mind map makes search engines no longer difficult to understand
Signature verification failed during system application installation
如何在office2016(word2016)中安装mathtype6.9及相关问题解决方案
扎实的基础知识+正确的方法是快速阅读源码的关键
Fastdfs quick start
快手处置超过5.4万个违规账号:如何打击平台上的违规账号
What is MYCAT? Get to know you quickly
Block queue - delayedworkqueue Source Analysis
About log traffic monitoring and early warning small project | flask
WIN11卸载小组件