XAML implementation Silder data binding to a TextBox-foreground data binding

Source: Internet
Author: User

The following is the ability to implement Silder and textbox data binding, that is, the value of Silder and the value of the textbox can be linked operation.

The Imagexaml code is as follows:<SliderGrid.Row= "0"Grid.column= "0"Margin= "0 0 0"Minimum= "0"Maximum= "255"Name= "Slider0"SmallChange= "0.1"LargeChange= "5"issnaptotickenabled= "True"Value="{Binding elementname=textbox1, path=text}"     >   </Slider><TextBoxGrid.Row= "0"Grid.column= "1"VerticalAlignment= "Center"HorizontalAlignment= "Center"FontSize= "+"Name= "TextBox1"Text="{Binding Elementname=slider0,path=value}"> </TextBox>this can be achieved. Before value= "{Binding elementname=textbox1, path=value}", a value was entered in the TextBox, but the slider did not change because the Path was wrong and should be changed to the Text property. 

XAML implementation Silder data binding to a TextBox-foreground data binding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.