Key Expression Blend FeaturesExpression Blend has added several fantastic new features. This section highlights some of the key features including a PathListBox which visually changes the way you think about the ListBox control. Also covered are enhancements to integrate MVVM development, new design time data features, binding enhancements, and new behaviors. Interoperability with Visual Studio 2010Expression Blend 4 Beta and Visual Studio 2010 use the same project format. Expression Blend 4 Beta can convert a Visual Studio 2008 project for you in order to work with it. PathListBox ControlThe PathListBox is a new control that introduces a new and flexible way to layout multiple items. Maintaining the selection and binding features of the traditional ListBox, the layout of the items is determined by defining one or more UIElements as LayoutPaths. Many properties are made available to customize the positioning and orientation of the items along the paths. Additionally, individual PathListBoxItems may be modified directly to change their appearance or layout. The image below demonstrates a dataset of years bound to the Items property of a PathListBox and the red arcing path is defined as the LayoutPath for the PathListBox.
Figure 23
PathListBox Control Create your own PathListBox by following the steps below:
Transition EffectsTransition Effects blend two visuals using a pixel effect over time and are applied in Blend 4 when configuring Visual State transitions. The TransitionEffects dropdown can be found under the “fx” and arrow icon, in the States panel on each transition. If a TransitionEffect is applied to a transition between States, the transition will be visible and animated with other changed properties during the State change. TransitionEffects available include the following:
Figure 24
Transition Effects Conditional BehaviorsAny Action can now be associated with a set of conditions that must be met in order to execute the Action. This means that with Expression Blend 4 Beta you can now build conditional logic into your prototypes and production applications without the need to write code. Bindable PropertiesProperties of behaviors are now bindable in the same way as FrameworkElement properties. This allows behaviors to be more dynamic and aware of the current context. To create a quick sample and see this new feature in action follow the steps below:
Figure 25
Bindable Behavior Properties
New BehaviorsAdding to the original set of eight behaviors, seven new behaviors have been added with a strong focus on interacting with data. Additionally the FluidMoveBehavior has been updated to provide more functionality than before. The new behaviors include the following:
MVVM Project and Item TemplatesThe MVVM templates are meant to be a starting point that illustrates some of the designer techniques available in Blend against a data model. They are not meant to teach developers about their architecture. In order to enable designers to work against a “real” data model, the data model needs to have a façade that is reasonably close to a real design pattern: our focus is on the techniques a designer would use to connect to a business data model and connections, rather than the implementation of the data models and backend logic themselves.
Figure 26
MVVM Templates Along with the new templates, new behaviors have been added to enable MVVM-based development. The CallMethodAction and InvokeCommandAction behaviors are a valuable asset when working with the interaction between Views and ViewModels. Design-time data from CLR typesIn addition to sample data based on XML, you can now create design-time sample data from your CLR types. Even if a type has no public constructor, or it has properties with no public setter, it can still be made into design-time sample data with the “Create Sample Data from Existing Class” command on the Data panel. The Data panel provides a view of an object’s DataContext, whether design-time or run-time, and allows you to drag properties and Commands onto the design surface to bind your UI to them. Design-time ViewModelsIf your application uses the MVVM pattern then you can use the “Create Sample Data from Existing Class” command on the Data panel to generate design-time sample ViewModels so that you can continue to design your application in the context of this data. |
Contents
|
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.