Author: Christian Nagel, Jay Glynn, Morgan Skinner
Pub Date: 2014
Size: 18 Mb
Whether you’re a C# guru or transitioning from C/C++, staying up to date is critical to your success. Professional C# 5.0 and .NET 4.5.1 is your go-to guide for navigating the programming environment for the Windows platform. After a quick refresher of the C# basics, the team of expert authors dives in to C# 5.0 and updates for NET 4.5.1. Includes:
•Different behaviors for .NET 4.5.1 and the changes to Visual Studio 2013
•Changes to ASP.NET Core, Web Forms, MVC, and Web API
•Updated Windows 8 deployments and localization, event logs, and data flow
•Shuffling of ADO.NET Entity Framework
•Additions to Windows Workflow Foundation
•New Windows Runtime 2.0 updates
With triggers you can change the look and feel of your controls dynamically based on certain events or property value changes. For example, when the user moves the mouse over a button, the button can change its look. Usually, you need to do this with the C# code. With WPF, you can also do this with XAML, as long as only the UI is influenced.
There are several triggers with XAML. Property triggers are activated as soon as a property value changes. Multi-triggers are based on multiple property values. Event triggers fire when an event occurs. Data triggers happen when data that is bound is changed. This section discusses property triggers, multi-triggers, and data triggers. Event triggers are explained later with animations.
Here, within the resources of the Window, a DataTemplate is created. This DataTemplate doesn’t have a key assigned and thus is a default for the Country. src type—it is also the alias of the XML namespace referencing the .NET assembly and .NET namespace.