CPSC Tutorial 9 Blend & Animations

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

CPSC Tutorial 5

CPSC Tutorial 5 WPF Applications

CPSC Tutorial 6

CPSC Tutorial 4 Visual Studio and C#

CPSC Tutorial 4

CS3240 Human-Computer Interaction

Yes, this is still a listbox!

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

CPSC 481 Tutorial 4. Intro to Visual Studio and C#

PowerPoint 2010 Quick Start to a Presentation

CS3240 Human-Computer Interaction Lab Sheet Lab Session 2

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

Table of contents. Sliding Billboard DMXzone.com

Adobe Fireworks CS Essential Techniques

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


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.

SPARK. User Manual Ver ITLAQ Technologies

Programming Windows, Sixth Edition

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

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

Fundamentals of XAML and Microsoft Expression Blend

Nintex Forms 2010 Help

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

truechart Menubar Documentation HighCoordination GmbH Version 1.0.2,

My own Silverlight textbox

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

Cropping an Image for the Web

Weather forecast ( part 2 )

ArcGIS Pro SDK for.net: Advanced User Interfaces in Add-ins. Wolfgang Kaiser

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

SPECIFICATIONS Insert Client Name

GEOCIRRUS 3D Viewer. User Manual: GEOCIRRUS 3D Viewer Document version 1.6 Page 1

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

The insertion point will appear inside the text box. This is where you can begin typing.

Multimedia web page Board

Strategic Series-7001 Introduction to Custom Screens Version 9.0

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

Hands-On Lab. Hello Windows Phone

Tutorial. Movicon NExT. Tutorial. Ver.3.3

XAML - BUTTON. The Button class represents the most basic type of button control. The hierarchical inheritance of Button class is as follows

Word 3 Microsoft Word 2013

Fish Eye Menu DMXzone.com Fish Eye Menu Manual

Animating the Page IN THIS CHAPTER. Timelines and Frames

Adobe Premiere Pro CC 2015 Tutorial

Working With Images: Intermediate Photoshop

11.1 Create Speaker Notes Print a Presentation Package a Presentation PowerPoint Tips... 44

Content Elements. Contents. Row

SNOWFLAKES PHOTO BORDER - PHOTOSHOP CS6 / CC

[MS10553]: Fundamentals of XAML and Microsoft Expression Blend

Dreamweaver Tutorials Working with Tables

Reviewer s Guide. Morpheus Photo Warper. Screenshots. Tutorial. Included in the Reviewer s Guide: Loading Pictures

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

Understanding Acrobat Form Tools

Week 6: First XAML Control Exercise

ITP 101 Project 2 - Photoshop

NE Fundamentals of XAML and Microsoft Expression Blend

How to create a prototype

Microsoft CSharp

This presentation will show you how to create a page in a group eportfolio.

Contents. Introducing Clicker Paint 5. Getting Started 7. Using The Tools 10. Using Sticky Points 15. Free resources at LearningGrids.

BCIS 4650 Visual Programming for Business Applications

Wix Tutorial 10/2/2015. Prof. María L. Moctezuma

BASICS OF MOTIONSTUDIO

Expression Design Lab Exercises

User Guide. Product Design. Version 2.2.2

Centricity 2.0 Section Editor Help Card

Adobe After Effects Tutorial

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

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

Course 2D_SL: 2D-Computer Graphics with Silverlight Chapter C5: The Complete Code of PathAnimation. Copyright by V. Miszalok, last update:

Designer Reference 1

Flash Image Enhancer Manual DMXzone.com Flash Image Enhancer Manual

Microsoft Word

Chapter 6 Formatting Graphic Objects

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

PAGES, NUMBERS, AND KEYNOTE BASICS

Contact: Systems Alliance, Inc. Executive Plaza III McCormick Road, Suite 1203 Hunt Valley, Maryland Phone: / 877.

Telerik Test Studio. Web/Desktop Testing. Software Quality Assurance Telerik Software Academy

Windows Presentation Foundation. Jim Fawcett CSE687 Object Oriented Design Spring 2018

Working with Images 1 / 12

Adobe Fireworks CS Essential Techniques

Oracle Eloqua s User Guide

Introduction to InDesign Rulers- Do not lock guides. How to lock and unlock guides? View> Grids and Guides> Lock Guides Feature computer- On the

Using Masks for Illustration Effects

ComponentOne. HyperPanel for WPF

CLASS 6: March 5, 2014 MULTIMEDIA TOOLS: DGIM 601-W01 (127469)

Adobe CC as Wireframe and Web Design Tool

ArcGIS Pro SDK for.net Advanced User Interfaces in Add-ins. Wolfgang Kaiser

Working with Symbols and Instances

Brianna Nelson Updated 6/30/15 HOW TO: Docs, Sheets, Slides, Calendar, & Drive. English

To learn how to use Focus in Pix:

Oracle Eloqua s User Guide

A PRACTICAL GUIDE TO USING WIX TO BUILD A WEBSITE

Label Design Program Label Artist-II Manual Rev. 1.01

Cognos. Active Reports Development. Presented by: Craig Randell

How to Add Text to an Animated Image

Adobe Illustrator CS5 Part 2: Vector Graphic Effects

Using Adobe Contribute 4 A guide for new website authors

Transcription:

CPSC 481 - Tutorial 9 Blend & Animations (based on previous tutorials by Alice Thudt, Fateme Rajabiyazdi, David Ledo, Brennan Jones, and Sowmya Somanath)

Today Blend & Animations Using Blend Hands on example PicturO

Final Project Part II Vertical Prototype Deliverables: 1. An evaluation of your current horizontal prototype using a technique learned in class e.g. walkthrough, heuristic evaluation, etc Then do redesign using your evaluation 2. A substantial part of the vertical functionality 3. A heuristic evaluation of your final interface

Deadlines Main Project deadline: Friday April 7th Submitted in-class at 10am Complete portfolio, redesign rationale, implementation, screenshots, etc Hand in code & README via DVD/USB

Deadlines Project Demonstrations: April 10-14 Sign-ups TBA, scheduled with the TA All members must attend Demos will run strictly from USB/media Must run on projector computer in MS 156

1. Using Blend

Expression Blend Expression Blend, Visual Studio, and.net provide a very compelling and seamless design and development workflow Rapidly iterate on both the user experience and core architecture, evolving your ideas quickly from initial prototype through to completed project

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

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! r e n g i s e D r e t t e B A 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 Blend Code the logic & interaction in Visual Studio

Starting Blend

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

Starting Blend

The Interface

The Interface

More Tools

More Tools

The Interface

The Interface

Object Browser This is where you see your Visuals Arranged as a reversed list Visuals on the bottom are on top Also true for nested Visuals inside Containers Think Layers and Groups

The Interface

Properties

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/ colours/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 XAML Code as well

Coding

Coding You can code directly in Expression Blend, BUT it is highly suggested to use Visual Studio in parallel with it for coding 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

2. Hands on Example PicturO

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

Hands on

Start Screen

Photo Browsing

Viewing a Photo

Window

Window

Window

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

MainWindow

Start Screen

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

Animation Done with C# WPF using Storyboards Can also be done easily using Blend

Animation

Custom Button 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

Custom Button 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 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 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

Visibility 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 Back-end Code 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 Back-end Code 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

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 private PhotoDB db; this.db = new PhotoDB(); this.db.loadphotos("c:\\users\\kevin\\dropbox\\photos\\tutorial"); MakeTiles(); void MakeTiles() { string[] photo_paths = this.db.photos; foreach (string path in photo_paths) { // grab the image from the path BitmapImage img = new BitmapImage(new Uri(path)); PhotoTileControl phototile = new PhotoTileControl(); phototile.imagecontent.source = img; phototile.imagetitle.text = path.split('\\').last().split('.').first(); this.photoviewergrid.children.add(phototile); } } We will then access the photos in this class in MainWindow and create PhotoTileControl s for each of them, then add them to the PhotoViewerGrid

Viewing a Photo

Viewing a Photo Again, we will create a UserControl for 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 void MakeTiles() { string[] photo_paths = this.db.photos; foreach (string path in photo_paths) { // grab the image from the path BitmapImage img = new BitmapImage(new Uri(path)); PhotoTileControl phototile = new PhotoTileControl(); phototile.imagecontent.source = img; phototile.imagetitle.text = path.split('\\').last().split('.').first(); phototile.mousedown += new MouseButtonEventHandler(photoTile_MouseDown); this.photoviewergrid.children.add(phototile); } }

Viewing a Photo Collapse all of the other views Create an instance of the PhotoPageControl and populate it with the data from the PhotoTileControl void phototile_mousedown(object sender, MouseButtonEventArgs e) { this.photogrid.visibility = Visibility.Collapsed; this.splashgrid.visibility = Visibility.Collapsed; PhotoPageControl photopage = new PhotoPageControl(); photopage.photopagetitle.text = (sender as PhotoTileControl).ImageTitle.Text; photopage.photo.source = (sender as PhotoTileControl).ImageContent.Source; this.maingrid.children.add(photopage); }

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 void phototile_mousedown(object sender, MouseButtonEventArgs e) { this.photogrid.visibility = Visibility.Collapsed; this.splashgrid.visibility = Visibility.Collapsed; PhotoPageControl photopage = new PhotoPageControl(); photopage.photopagetitle.text = (sender as PhotoTileControl).ImageTitle.Text; photopage.photo.source = (sender as PhotoTileControl).ImageContent.Source; photopage.backbutton.click += new RoutedEventHandler(BackButton_Click); this.currentphotopage = photopage; this.maingrid.children.add(photopage); } void BackButton_Click(object sender, RoutedEventArgs e) { this.photogrid.visibility = Visibility.Visible; this.maingrid.children.remove(this.currentphotopage); this.currentphotopage = null; }

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 cite it

Next Week Project Group Meetings 15 minutes in Tutorial Show me some interactive scenarios of your implementation I will give feedback

Thanks! Any questions? You can find me at: kta@ucalgary.ca Disapproval Meowchi