Duration: 14 minutes
Summary: In this video, we continue our binding discussion. We will see how to use the OneWay binding by having a text box with an initial value. That value is bound to a rectangle’s stroke thickness. When we change the value in the text box, the thickness in the rectangle will not be affected. We will then experiment with a more involved example: We have a textbox, a slider and a text block. There is a two way binding between the textbox and the slider (when one value changes the other does as well). But then there is a one way binding between the text box and the text block. The text block will reflect the value but in a currency format. To do that we need a converter. We will create a class that implements the IValueConverter interface and provide functionality for the Convert method. We will also see how to define the converter in the XAML.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: Silverlight 5 and Visual Studio 2010
Keyword: Silverlight 5, Visual Studio 2010, XAML, Border, StackPanel, Margin, Rectangle, Grid, Slider, RadialGradientBrush, DockPanel, Binding, ElementName, Path, Orientation, Mode, UserControl, Resources, Converter, StaticResource, IValueConverter.