Visual Studio LightSwitch 2012 by Tim Leung
Author:Tim Leung
Language: eng
Format: epub
ISBN: 9781430250715
Publisher: Apress
Listing 11-7. Duration Editor Control
File:ApressControlsVB\DurationEditor.xaml
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ApressControlsVB"
x:Class="ApressControlsVB.DurationEditor"
mc:Ignorable="d">
<Grid x:Name="LayoutRoot" Background="White">
<local:DurationEditorInternal
Duration="{Binding Value, Mode=TwoWay}"/>
</Grid>
</UserControl>
In the code that’s shown, Visual Studio adds the local namespace when you drag the DurationEditorInternal control onto your screen. If you’re re-creating this example by directly retyping the XAML that’s shown in this book, you’ll need to make sure that you enter the correct class names.
The definition of the DurationEditorInternal control within the XAML allows you to data-bind the “normal” Duration property by specifying the binding path Value.
You’re now ready to build your ApressControls project. Save the output file (ApressControls.DLL) into a location that you can refer to later.
Tip Creating a wrapper control provides a simple, declarative way to bind a custom control to the data context. If you prefer not to create two controls, another way to achieve this is to create a custom control that includes a call to SetBinding in its constructor.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(15946)
The Mikado Method by Ola Ellnestam Daniel Brolund(13212)
Hello! Python by Anthony Briggs(13040)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(12226)
Dependency Injection in .NET by Mark Seemann(12071)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(10843)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(10663)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10537)
Grails in Action by Glen Smith Peter Ledbrook(10140)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(10029)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(9480)
Hit Refresh by Satya Nadella(9040)
Kotlin in Action by Dmitry Jemerov(8745)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8649)
The Kubernetes Operator Framework Book by Michael Dame(8485)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8306)
Robo-Advisor with Python by Aki Ranin(8261)
Practical Computer Architecture with Python and ARM by Alan Clements(8232)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8202)