如何通过XAML在Silverlight中的Silverlight DataGrid中添加编辑按钮? [英] How to add edit button in silverlight datagrid in silverlight through xaml?

查看:95
本文介绍了如何通过XAML在Silverlight中的Silverlight DataGrid中添加编辑按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过xaml在Silverlight中的Silverlight DataGrid中添加编辑按钮?

How to add edit button in silverlight datagrid in silverlight through xaml? how can i implement this with code?

推荐答案

以下代码将一个按钮放到标题中.
这是您要找的东西吗?

The following code puts a button into the header.
is this what you are looking for?

<Style x:Key="ColumnHeaderStyle"    TargetType="dataprimitives:DataGridColumnHeader">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
              <Button Content="{TemplateBinding Content}" Click="Button_Click" />
             </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


这篇关于如何通过XAML在Silverlight中的Silverlight DataGrid中添加编辑按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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