<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的更多相关文章

  1. [WP8.1UI控件编程]Windows Phone理解和运用ItemTemplate、ContentTemplate和DataTemplate

    2.2.5 ItemTemplate.ContentTemplate和DataTemplate 在理解ItemTemplate.ContentTemplate和DataTemplate的关系的之前,我 ...

  2. DevExpress::XtraBars::BarEditItem获取EditValue值事件

    //视图设计器中拖动一个barManager,添加一个bar,再添加一个BarEditItem控件,如下代码: private: DevExpress::XtraEditors::Repository ...

  3. WPF中的数据模板使用方式之一:ContentControl、ContentTemplate和TemplateSelector的使用

    在WPF中,数据模板是非常强大的工具,他是一块定义如何显示绑定的对象的XAML标记.有两种类型的控件支持数据模板:(1)内容控件通过ContentTemplate属性支持数据模板:(2)列表控件通过I ...

  4. [UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口)

    原文:[UWP]为什么ContentControl的ContentTemplate里放两个ContentPresenter会出问题(绕口) 1. 简单的HeaderedContentControl 上 ...

  5. dataTemplate 之 ContentTemplate 的使用

    <Window x:Class="WpfApplication1.Window38" xmlns="http://schemas.microsoft.com/win ...

  6. Emoji选项列表

    一.需要的前提文件 从网上下载Emoji的表情包,当然是png的图片,因为WPF不支持彩色的Emoji,所以,做列表的时候,需要用图片. 随着压缩包一起的还有一个Emoji.xml文件,文件的层级结构 ...

  7. 【Win10】UAP/UWP/通用 开发之 x:Bind

    [Some information relates to pre-released product which may be substantially modified before it's co ...

  8. 2000条你应知的WPF小姿势 基础篇<69-73 WPF Freeze机制和Template>

    在正文开始之前需要介绍一个人:Sean Sexton. 来自明尼苏达双城的软件工程师.最为出色的是他维护了两个博客:2,000ThingsYou Should Know About C# 和 2,00 ...

  9. DropDownList 下拉框选择改变,促发事件和防全局刷新(记录)

    代码: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:Script ...

随机推荐

  1. [Chapter 3 Process]Practice 3.3 Discuss three major complications that concurrent processing adds to an operating system.

    3.3  Original version of Apple's mobile iOS operating system provied no means of concurrent processi ...

  2. jsp 和jspf

    http://www.cnblogs.com/liaojie970/p/5035077.html

  3. 【排列组合】bzoj3505 [Cqoi2014]数三角形

    http://blog.csdn.net/zhb1997/article/details/38474795 #include<cstdio> #include<algorithm&g ...

  4. 完全背包问题:湫湫系列故事――减肥记I(HDU 4508)

    湫湫系列故事――减肥记I  HDU 4508 一道裸的完全背包 #include<iostream> #include<algorithm> #include<stdio ...

  5. URAL 1915 Titan Ruins: Reconstruction of Bygones(思路)

    搞这个题差不多是从比赛开始到结束. 从自信慢慢的看题一直到wrong到死. 这个题目可以说成是思路题,以为我们只要明白一点,这道题就成了纯暴力的水题, 那就是当操作数不足栈中数字数目的时候,我们就没有 ...

  6. h5专题常用小代码

    今天把做专题常用的js代码总结出来(持续更新),方便以后直接复制使用,不用老敲啊敲 1.屏幕适配JS代码 <script> var phoneScale = parseInt(window ...

  7. 在Linux Ubuntu上编译DNX

    DNX是.NET Execution Environment,前身是XRE,XRE的前身是KRuntime,项目网址:https://github.com/aspnet/DNX . 签出DNX的代码: ...

  8. Wix 安装部署教程(三)自定义安装界面和行为

    接上一篇自定义安装界面,这篇继续探索,首先介绍下,Wix为我们定义了五种风格,每种风格的UI都是有一定顺序的.我们可以改变安装顺序,也可以完全自定义一个Dialog插入其中.比如Wix_Mondo 风 ...

  9. 清爽绿色格调图文box通用样式

    今天是端午节,小菜献上一款剽窃的box样式,祝大家端午快乐! 此box样式以绿色为主要色调,清新自然,适合大多数设计场景. 此box算是比较高级的了,box中的列表是图文列表,可以显示一张小图片,然后 ...

  10. 开启Github之旅

    在那个远古时代,我以为可以用GoogleCode干点事,结果啥也没干好.如今,Github已经成为了业界标杆,就连Google.微软.Facebook的开源项目都往Github搬.Github作为全球 ...