当前位置:网站首页>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 .
边栏推荐
- How to guarantee the quality of real-time data, the cornerstone of the 100 million level search system (Youku Video Search)? v2020
- Blocking queue - delayedworkqueue source code analysis
- [no title] 4555
- day01
- Small project on log traffic monitoring and early warning | environment and foundation 1
- [network planning] 3.2 transport layer - UDP: connectionless service
- SqlServer中的锁
- The JVM determines whether an object can be recycled
- 跳转页面后回不去默认页面
- f‘s‘f‘s‘f‘s‘d
猜你喜欢

适配器模式

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

With a market value of 21.5 billion yuan, will the post-80s generation in Sichuan make TV history?

About log traffic monitoring and early warning small project | flask

Introduction and basic construction of kubernetes

C语言实现设置桌面壁纸

About log traffic monitoring and early warning small project | database management tool: migrate

What is thread in concurrent programming
![[network planning] 2.2.3 user server interaction: cookies](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network planning] 2.2.3 user server interaction: cookies

阻塞隊列 — DelayedWorkQueue源碼分析
随机推荐
手把手教你前后分离架构(五) 系统身份验证实现
Pirate OJ 148 String inversion
自动化测试系列
Slam Kalman filter & nonlinear optimization
Random points in non overlapping rectangles
Why web development with golang
[network planning] 2.2.3 user server interaction: cookies
Download Google gcr IO image
如何在office2016(word2016)中安装mathtype6.9及相关问题解决方案
浅谈IEEE会议论文的不出席政策Non-Presented Paper(No-Show)Policy
logback日志框架
[论文阅读] TGANet: Text-guided attention for improved polyp segmentation
[论文阅读] FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
Serrures dans SQLSERVER
compiler explorer
嵌入式学习资料和项目汇总
WIN11卸载小组件
STM32 cannot download again after downloading the code
增额终身寿险产品都有哪些优势?门槛高吗?
What exactly does Devops mean?