在页面内绑定 [英] Binding inside a page

查看:53
本文介绍了在页面内绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我移动滑块控件时,我想更改在同一窗口中发生的文本框(该文本框与滑块绑定)的值.

When i move my slider control i want to change the value of the text box (that text box is binded with the slider) that is happened in same window .when i try with page binding with (Window)slider that is not happening.

推荐答案

这是示例代码.

Here is a sample code.

<TextBox Height="23" HorizontalAlignment="Left" Margin="12,0,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="{Binding ElementName=slider1, StringFormat=0, Path=Value, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"  />
       <Slider Height="23" HorizontalAlignment="Left" Margin="12,35,0,0" Name="slider1" VerticalAlignment="Top" Width="100" />




希望这对您有帮助... !!!




Hope this will help you...!!!


这篇关于在页面内绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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