If everything seems under control,
You’re just not going fast enough
– Mario Andretti
If everything seems under control,
You’re just not going fast enough
– Mario Andretti
I’m pleased and proud to announce my newest book, from Apress, named either XAML For Windows 8: Read Me First or XAML Primer (we’re still discussing! Which name do you prefer?)
|
If you are interested in learning Windows 8 programming with XAML and C# but your XAML isn’t yet up to snuff, then this is the book for you. It is very short (about 100 pages) and to the point (you start writing code in chapter 1). It is the book to read before you tackle one of the full texts on Programming Windows 8 (such as my forthcoming Pro Windows 8 Development with XAML and C#
|
This book’s first draft is complete and we should have an e-version very soon.
Personally, I believe that XAML has a long healthy life ahead. Almost everyone I’ve spoken with who programs W8 in both XAML and HTML says that they are more productive in XAML.
It is the shared language not only of Silverlight and WPF but of Windows 8 and Windows Phone. These are serious commitments by Microsoft.
But I have a strong bias: I’ve invested six years in developing expertise in XAML, my job is as a XAML/W8 Evangelist for Telerik and I have two books coming from Apress on Programming Windows 8 with XAML.
At the moment I’m not putting time into learning the JS side of the house; but I’m keeping my eyes open. What about you?
Talking with Adam Kinney, Independent Design Developer and former
Microsoft Evangelist and Jon Galloway, Microsoft Technical Evangelist, about programming for Windows 8 using JavaScript, CSS3 and HTML5.
In Part 4 of this mini-series on data binding we looked at Data Conversion.
Today we look at binding a UI Element to a list of objects.
The trick in binding to a list, is to teach the control how to display the bound data. It needs to know how to display each object in the list – what properties of the object should be displayed and how should they appear?
I will be coming to Belgium on September
18 to speak at Visug about Windows 8.
I will then be in the Netherlands to speak at DotNed/Sixin UG on Thursday 9/20 and then to SDN on 9/21.
Next, I’ll be in the UK, speaking at these user groups:
Finally, I fly out of the UK and on to Sofia, Bulgaria, where I’ll be speaking at DevReach.
In Part 3 of this little mini-series on data binding in Windows 8 we looked at Element Binding. Today, we’ll take a look at Data Conversion. ![]()
At times the data in your business object (the source for your binding) and the target UIElement may not have an exact type match. For example, if your Employee class wants to keep track of the start date for each Employee, a sensible way to do so is with a DateTime object. However, when we display that data we’ll want to use a Text object, and we may not want the entire default conversion of a DateTime to a string. To rectify this problem, we can create a class that performs a conversion from one type to another (in this case, from DateTime to string). This class will implement IValueConverter and will have two methods: Convert, and ConvertBack.
In my previous post, I discussed the three modes of DataBinding for Windows 8. Today
we’ll take a brief look at binding not to data, but rather binding one UI element to the value of another. In this example, we’ll bind the IsActive property of the ProgressRing to the IsChecked property’s value in a CheckBox.
<StackPanel>
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Left"
>
<TextBlock
Text="ProgressRing:"
VerticalAlignment="Center"
Margin="0,0,20,0" />
<Border
BorderThickness="1"
BorderBrush="#44000000"
Padding="10">
<ProgressRing
x:Name="ProgressRing1"
IsActive="{Binding IsChecked,
ElementName=ActiveCB}" />
</Border>
</StackPanel>
<CheckBox
Name="ActiveCB"
Content="Active?" />
</StackPanel>
Notice that the IsActive property is bound to the IsChecked property and the ElementName (ActiveCB) is the Name of the CheckBox with that property.
That’s it, there is no code associated with this example; just the XAML.
In my previous blog post I introduced data binding. It worked, but there was no mechanism for updating. Updating comes in two flavors, and these are often confused by folks new to databinding:
Data-binding is often thought of as an advanced topic, but there really is no reason for that. data-binding is