如何在WPF中访问用户控件文本框的值 [英] How to access value of textbox of user control in wpf

查看:70
本文介绍了如何在WPF中访问用户控件文本框的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在WPF应用程序中有两个用户控件.我想通过单击另一个用户控件中存在的按钮来更改文本框"控件的文本.

请帮帮我.

Hi,

I have two user controls in a WPF application. I want to change the "text of the Textbox control by clicking a button which is present in another user control.

Please help me out.

推荐答案

您可以将datagrid模板用作:
You can use datagrid template as:
<DataGridTemplateColumn Header="Command">
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <Button Name="cmdCommand" Click="{Binding Command}"

                    Content="Command"/>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn


这篇关于如何在WPF中访问用户控件文本框的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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