CPSC 481 Tutorial 10 Expression Blend. Brennan Jones (based on tutorials by Bon Adriel Aseniero and David Ledo)

Similar documents
CPSC Tutorial 9 Blend & Animations


Yes, this is still a listbox!

PowerPoint 2010 Quick Start to a Presentation

CS3240 Human-Computer Interaction Lab Sheet Lab Session 2

CPSC Tutorial 6

CS3240 Human-Computer Interaction Lab Sheet Lab Session 3 Designer & Developer Collaboration

SPARK. User Manual Ver ITLAQ Technologies

GIMP WEB 2.0 ICONS. Web 2.0 Icons: Circle Completed Project. Notice that the default new layer background fill is transparency. Click the Ok button.

My own Silverlight textbox

truechart Menubar Documentation HighCoordination GmbH Version 1.0.2,

CPSC Tutorial 5 WPF Applications

CS3240 Human-Computer Interaction Lab Sheet Lab Session 4 Media, Ink, & Deep Zoom

Working with Symbols and Instances

Animating the Page IN THIS CHAPTER. Timelines and Frames

Table of contents. Sliding Billboard DMXzone.com

LAYOUT. Chapter 3 of Pro WPF : By Matthew MacDonald Assist Lect. Wadhah R. Baiee. College of IT Univ. of Babylon

GIMP WEB 2.0 ICONS. GIMP is all about IT (Images and Text) OPEN GIMP

Programming Windows, Sixth Edition

CPSC Tutorial 5

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI)

BASICS OF MOTIONSTUDIO

User Guide. DrawAnywhere.com: User Guide

Working With Images: Intermediate Photoshop

animation, and what interface elements the Flash editor contains to help you create and control your animation.

Hands-On Lab. Hello Windows Phone

Content Elements. Contents. Row

Adobe After Effects Tutorial

Using Masks for Illustration Effects

SHAPES & TRANSFORMS. Chapter 12 of Pro WPF : By Matthew MacDonald Assist Lect. Wadhah R. Baiee. College of IT Univ.

Tutorial. Movicon NExT. Tutorial. Ver.3.3

Centricity 2.0 Section Editor Help Card

Goldfish 4. Quick Start Tutorial

Step 1: Create A New Photoshop Document

Designer Reference 1

Adobe Fireworks CS Essential Techniques

A Guide to Using WordPress + RAVEN5. v 1.4 Updated May 25, 2018

Microsoft Word

How do I make a basic composite or contact sheet?

Adobe Premiere Pro CC 2015 Tutorial

HAPPY HOLIDAYS PHOTO BORDER

Flash Album Generator 2 Manual Version 1.0. About Flash Album Generator 2. Flash Album Generator 2 Manual version 1.0 DMXzone.com

Mach4 CNC Controller Screen Editing Guide Version 1.0

Grade: 7 Lesson name: Creating a School News Letter Microsoft Word 2007

Microsoft Word 2007 on Windows

Adobe Photoshop Sh S.K. Sublania and Sh. Naresh Chand

Fundamentals of XAML and Microsoft Expression Blend

GIMP WEB 2.0 ICONS. GIMP is all about IT (Images and Text) OPEN GIMP

Netscape Composer: Working with Tables

Managing Objects 6. Introduction. In This Chapter CHAPTER

CS3240 Human-Computer Interaction

Creating a Flyer. Open Microsoft Publisher. You will see the list of Popular Publication Types. Click the Blank Page Sizes.

Adobe Illustrator. Always NAME your project file. It should be specific to you and the project you are working on.

Week 5 Creating a Calendar. About Tables. Making a Calendar From a Table Template. Week 5 Word 2010

Clip Art and Graphics. Inserting Clip Art. Inserting Other Graphics. Creating Your Own Shapes. Formatting the Shape

Krita Vector Tools

AGENT123. Full Q&A and Tutorials Table of Contents. Website IDX Agent Gallery Step-by-Step Tutorials

Expression Design Lab Exercises

Tips and Techniques for Designing the Perfect Layout with SAS Visual Analytics

9 Using Appearance Attributes, Styles, and Effects

Description: Learn how to create a beautiful pumpkin using Bitmaps for Textures and the Gradient Fill Editor to colour the shapes.

PART I: INTRODUCTION TO WINDOWS 8 APPLICATION DEVELOPMENT CHAPTER 1: A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT 3

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

Word 2013 Quick Start Guide

Video Xpress Quick Startup Guide

[MS10553]: Fundamentals of XAML and Microsoft Expression Blend

EXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING

Chapter 6 Formatting Graphic Objects

SNOWFLAKES PHOTO BORDER - PHOTOSHOP CS6 / CC

USER GUIDE: EDITOR. Drag & drop system: Content Manager Style Editor Add Elements Undo/Redo Save...

Overview of Adobe Fireworks

Understanding Acrobat Form Tools

Bforartists Reference Manual - Copyright - This page is under Public Domain. Editors

NE Fundamentals of XAML and Microsoft Expression Blend

hdalbum User Designer Guide Collect Create Share Designer V 1.2

Adobe Illustrator CS5 Part 2: Vector Graphic Effects

Advanced Special Effects

Learning to use the drawing tools

ekaizen Lessons Table of Contents 1. ebook Basics 1 2. Create a new ebook Make Changes to the ebook Populate the ebook 41

introduction what you'll learn

Adobe Flash CS4 Part 4: Interactivity

OnPoint s Guide to MimioStudio 9

ADOBE PHOTOSHOP Using Masks for Illustration Effects

How to...create a Video VBOX Gauge in Inkscape. So you want to create your own gauge? How about a transparent background for those text elements?

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

Adobe Flash Course Syllabus

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

SPECIFICATIONS Insert Client Name

Photoshop Basics A quick introduction to the basic tools in Photoshop

OpenForms360 Validation User Guide Notable Solutions Inc.

Guide to Editing Map Legends

Adding Text and Images. IMCOM Enterprise Web CMS Tutorial 1 Version 2

Adobe Flash CS4 Part 2: Working with Symbols

FLIR Tools+ and Report Studio

Intermediate Microsoft Word 2010

Enterprise Portal Train the Trainer User Manual WEB PARTS

SmartView. User Guide - Analysis. Version 2.0

Designing Forms in Access

Word 3 Microsoft Word 2013

Overview of the Adobe Dreamweaver CS5 workspace

Transcription:

CPSC 481 Tutorial 10 Expression Blend Brennan Jones bdgjones@ucalgary.ca (based on tutorials by Bon Adriel Aseniero and David Ledo)

Expression Blend Enables you to build rich and compelling applications for the desktop and web. Enables you to take full advantage of the underlying power of the platform. Rapid prototyping without writing code 3D transformations Pixel effects (blur, glow, ripple, etc.) Animation Visually edit the template of a control easily on the design surface, redesigning it to perfectly fulfill the function it will play within an application.

Basic Idea Design your interface in Expression Blend Code the logic and interaction in Visual Studio

Starting Expression Blend

Starting a Project Click on New Project if you want to start a project directly in Expression Blend. Choose this one for this tutorial. Click on Open Project if you want to use an existing project (which may have been created in Visual Studio).

Starting a Project Select WPF Application Name it Hit OK

The Interface Project/Solution viewer

The Interface Tools

Tools

The Interface Drawing Board

The Interface Objects and Timeline Layers

Objects This is where you see your Visuals Arranged as a reversed stack Visuals on the bottom are on top Also true for Visuals inside Containers which are inside another Container Think Layers and Groups

The Interface Object Properties

Properties Selecting a visual here brings up that visual s properties in here.

Properties Brushes Properties Used to edit the background fill, border stroke, opacity, etc. of a visual Uses RGB and alpha values or the hex value of a colour Nice resource for named colours: http://cloford.com/resources/col ours/500col.htm

Properties Appearance Used to change the appearance of a visual by setting its visibility and opacity, or adding effects to it such as blur or dropdown shadows

Properties Layout Used to change how the window will appear on the screen, or how a visual will flow with other visuals in a container. Use this to edit sizes, positions, and alignments.

Properties Some properties are only available to specific types of visuals. E.g., only windows can have an icon property or a window state property (maximized, minimized, etc.). These properties can be set in the Code Behind as well.

Coding Choose View Split View To view the XAML Editor

Coding You can code directly in Expression Blend, BUT it is highly suggested to use Visual Studio in parallel with it for coding. Why? Because you gain access to Visual Studio s rich set of tools for coding (refactor, debugger, etc.). Use Expression Blend for designing the GUI, use Visual Studio to code the logic.

Hands On We will create a picture viewer application using Expression Blend and Visual Studio. Functionalities: 1. Home screen 2. Page to see all photos 3. View each photo

PicturO

Window Select the window Change its width & height to 800x600

Window Select Background Change the Background colour to #FF353535

Window WindowStyle = None ResizeMode = NoResize Title = PicturO

Window Rename the grid contained in the window to MainGrid. Insert a new grid within it, call it SplashGrid.

Grids For both the MainGrid and SplashGrid: Set the width and height to Auto Set the HorizontalAlignment and VerticalAlignment to Stretch

Start Screen

Start screen Path: BackgroundShape TextBlock: P TextBlock: AppTitle Button: ViewPhotosButton Button: ExitButton Button: MinimizeButton

Animation Can be done in C# WPF using Storyboards. Can also be done easily using Expression Blend.

Animation On the Object & Timeline tab, click + This will add a Storyboard Resource

Animation As the Animation starts to record Edit a Visual s property at a starting time then add a new Keyframe to the ending time and put in the new value of the property.

Controls Visuals such as Buttons, Containers, and Shapes are called Controls. They have an underlying template specifying how they should look. The template is customizable.

Custom Button Add a Button to your window Right click -> Edit Template -> Create Empty Call it TileButton You can then apply this template to other buttons later on

Custom Button Good Interfaces should be responsive, so let us add feedback to our custom button when it gets hovered over. Add these: Cover: A transparent rectangle on top of the button Content: The content (text) presenter HoverColor: The coloured rectangle that shows up when the button gets hovered over

Custom Button Click + Property Change the second and third dropdowns to: IsMouseOver and True respectively On the Triggers tab, add the IsMouseOver = true event This means that every time the mouse is over our button, the animation will be triggered

Custom Button On the first row under the Activated when tab, select grid on the first dropdown box

Custom Button Click + on the Actions when activating tab Add a new Storyboard The Storyboard will then start recording

Custom Button Now our button gives us feedback Add an event to it that closes the app in Visual Studio ExitButton.Click this.close();

Applying our Template Add a minimize button to our app (if not already there) Right click on the button -> Edit Template -> Apply Resource -> choose your template Add an event to it MinimizeButton.Click this.windowstate = WindowState.Minimize

Photos

Create a new grid This is where we will show our photos It has a ScrollViewer that has a UniformGrid inside of it called PhotoViewerGrid

Visibility Separate our different views into Grids (if not already done) If SplashGrid is visible, then PhotoGrid should be hidden, and vice versa

Photo Tile Here, we will need to load photos into tiles which we call PhotoTiles Create a Grid, and inside it, add an Image control and a TextBlock The Image control will contain our photo The TextBlock will contain the title of the photo

Photo Tile Great! We now have a PhotoTile But wait Do we really want to do this for every photo we have? No! Use UserControls

User Controls User-defined Controls (e.g., CommentBox) that can be used as templates within a project. Useful for when you have multiple things that should look the same but have different content.

Photo Tile Right click and turn our PhotoTile grid into a UserControl We can now reuse it for many photos!

Loading Photos On the Code Behind Create a Class called PhotoDB This class will have a LoadPhotos method and will contain all of the paths to our photos in a string array

Loading Photos In PhotoDB.cs: class PhotoDB { private string[] photos = { }; public string[] Photos { get { return this.photos; } } } public void LoadPhotos(string path) { try { photos = System.IO.Directory.GetFiles(path); } catch (Exception) { // Do nothing } }

Loading Photos We will then access the photos in this class and create PhotoTileControls for each of them, then add them to the PhotoViewerGrid

Viewing a Photo

Viewing a Photo Again, we will create a UserControlfor this Start with drawing a grid that has TextBlock, an Image control, and a StackPanel for comments Turn it into a UserControl called PhotoPageControl

Viewing a Photo Go to the code where we create each PhotoTileControl and subscribe to its MouseDown event Add this

Viewing a Photo Collapse all of the other views Create an instance of the PhotoPageControl and populate it with the data from the PhotoTileControl

Viewing a Photo Now, clicking on a PhotoTile will open up a photo page. But we re stuck! We can t go back to the photo list from the photo page. Solve this by adding a back button inside the PhotoPageControl.

Viewing a Photo

Extending this To allow for comments within the PhotoPageControl, create a CommentBox UserControl that has TextBlocks for the name of commenter and the comment, and a delete button. Add TextBoxes so that when someone types on it and presses Enter (or a send button), it will generate a CommentBox with the respective data from the TextBox fields. Append the CommentBox to a Scrollable StackPanel within the PhotoPageControl.

Extending this NO! You cannot submit this example app as your project. You may reuse code from this example, as long as you citeit. Hope you learned something new!