BarEditItem ContentTemplate
<dxb:BarEditItem Name="txtSearch" >
<dxb:BarEditItem.ContentTemplate>
<DataTemplate>
<dxe:ButtonEdit Name="btnEditEducationResources" AllowDefaultButton="False" MinWidth="200"
KeyDown="btnEditEducationResources_KeyDown"
MouseLeftButtonUp="btnEditEducationResources_MouseLeftButtonUp">
<dxe:ButtonEdit.Buttons>
<dxe:ButtonInfo Name="btnSearch" >
<Image Stretch="Uniform" Source="/Gemr;component/Images/16/Search_16.jpg"></Image>
</dxe:ButtonInfo>
</dxe:ButtonEdit.Buttons>
</dxe:ButtonEdit>
</DataTemplate>
</dxb:BarEditItem.ContentTemplate> </dxb:BarEditItem>
private void btnEditEducationResources_KeyDown(object sender, KeyEventArgs e)
{
ButtonEdit btnEdit = sender as ButtonEdit;
if (btnEdit == null) return; if (btnEdit.EditValue == null) return; if (e.Key == Key.Enter)
{
string strKey = btnEdit.EditValue.ToString();
if (string.IsNullOrEmpty(strKey)) return; this.ExecuteEducationResourcesSearch(strKey);
}
}
BarEditItem ContentTemplate的更多相关文章
- [WP8.1UI控件编程]Windows Phone理解和运用ItemTemplate、ContentTemplate和DataTemplate
2.2.5 ItemTemplate.ContentTemplate和DataTemplate 在理解ItemTemplate.ContentTemplate和DataTemplate的关系的之前,我 ...
- DevExpress::XtraBars::BarEditItem获取EditValue值事件
//视图设计器中拖动一个barManager,添加一个bar,再添加一个BarEditItem控件,如下代码: private: DevExpress::XtraEditors::Repository ...
- WPF中的数据模板使用方式之一:ContentControl、ContentTemplate和TemplateSelector的使用
在WPF中,数据模板是非常强大的工具,他是一块定义如何显示绑定的对象的XAML标记.有两种类型的控件支持数据模板:(1)内容控件通过ContentTemplate属性支持数据模板:(2)列表控件通过I ...
- [UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口)
原文:[UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口) 1. 简单的HeaderedContentControl 上 ...
- dataTemplate 之 ContentTemplate 的使用
<Window x:Class="WpfApplication1.Window38" xmlns="http://schemas.microsoft.com/win ...
- Emoji选项列表
一.需要的前提文件 从网上下载Emoji的表情包,当然是png的图片,因为WPF不支持彩色的Emoji,所以,做列表的时候,需要用图片. 随着压缩包一起的还有一个Emoji.xml文件,文件的层级结构 ...
- 【Win10】UAP/UWP/通用 开发之 x:Bind
[Some information relates to pre-released product which may be substantially modified before it's co ...
- 2000条你应知的WPF小姿势 基础篇<69-73 WPF Freeze机制和Template>
在正文开始之前需要介绍一个人:Sean Sexton. 来自明尼苏达双城的软件工程师.最为出色的是他维护了两个博客:2,000ThingsYou Should Know About C# 和 2,00 ...
- DropDownList 下拉框选择改变,促发事件和防全局刷新(记录)
代码: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:Script ...
随机推荐
- iOS删除本地文件
以前在博客里记录的东西都是截屏,没有插入代码,今天进去一看,图片都不显示了,只好重新插入代码,发现以前写的文件操作这块,没有写本地文件删除这个功能,重新再记录一下 //需要删除文件的物理地址 NSSt ...
- vsftpd的主动模式与被动模式
好不容易配置好了vsftpd服务,在CentOS本机测试没有问题,但是在我的Windows机器上使用FlashFXP连接的时候却出问题了: 我虽然知道FTP存在两种模式:PORT(主动)模式.PASV ...
- CSS定位之position详解(转载)
本文转载于xingoo的博文:http://www.cnblogs.com/xing901022/p/5193751.html position属性 在前端中,position是很常见的属性.通过这 ...
- git -- 如何解决冲突
遇到冲突,首先要编辑冲突文件,可以使用vim或者其他工具,冲突文件变现为: <<<<HEAD 到 ==== :代表本地分支的修改内容 ==== 到 >>>&g ...
- UVA 11992 Fast Matrix Operations(线段树:区间修改)
题目链接 2015-10-30 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=s ...
- maven异常
1.There are test failures pom中加入: <build> <plugins> <plugin> <groupId>org.ap ...
- linux增加根分区大小
以下操作以root身份运行 1.增加一个新分区(从原有硬盘分,或增加一个新硬盘并进行分区fdisk) 格式化成ext4(mkfs.ext4 /dev/sdb1,假设为/dev/sdb1) 2.将新的 ...
- ubuntu adobe flash player 安装
常规做法 1.先更新sudo apt-get update 2. sudo apt-get install flashplugin-installer 这次却卡在downloading这里 下不去.无 ...
- 【笔记】select2的使用
<script src="~/Scripts/jquery-1.10.2.js"></script> <script src="~/Cont ...
- RabbitMQ(一) -- Hello world
RabbitMQ -- Hello world RabbitMQ使用AMQP通信协议(AMQP是一个提供统一消息服务的应用层标准协议,基于此协议的客户端与消息中间件可传递消息,并不受客户端/中间件不同 ...