Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.

Slides:



Advertisements
Similar presentations
Tutorial 3 – Creating a Multiple-Page Report
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Chapter 3 – Web Design Tables & Page Layout
Panels, Tab Containers Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
CREATING A MULTIPLE PAGE REPORT Presented by: Dr. Ennis-Cole.
1 Publisher Lesson 2 Enhancing Publisher Documents Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Microsoft Office Word 2003 Tutorial 3 Creating a Multiple-Page Report.
Mahender Sarangam Having close to 5 years of experience. Working as a Senior Software Engineer in United Health Group. Good Knowledge on C#, ASP.NET,
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 15 Working with Tables 1 Morrison / Wells / Ruffolo.
Lesson 4: Formatting the Worksheet
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
1 Intro XAML Attribute syntax & property syntax Panels Reusable resources Controls Data binding Steen Jensen, spring 2014.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Microsoft Office Excel 2003 Tutorial 3 – Developing a Professional-Looking Worksheet.
CIS 205—Web Design & Development Dreamweaver Chapter 5 Using HTML Tables to Lay Out a Page.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
Adobe Dreamweaver CS3 Revealed CHAPTER FIVE: USING HTML TABLES TO LAY OUT A PAGE.
Creating a Document with a Title Page, Lists, Tables, and a Watermark
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
XP New Perspectives on Microsoft Word 2002 Tutorial 31 Microsoft Word 2002 Tutorial 3 – Creating a Multiple-Page Report.
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
Object Oriented Software Development 9. Creating Graphical User Interfaces.
© 2011 Delmar, Cengage Learning Chapter 1 Getting to Know Illustrator.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Computer Information Technology – Section 4-12 Some text and examples used with permission from: Note: We not endorsing or promoting.
Copyright 2006 South-Western/Thomson Learning Chapter 12 Tables.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Chapter 4 Working with Frames. Align and distribute objects on a page Stack and layer objects Work with graphics frames Work with text frames Chapter.
Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.
Key Applications Module Lesson 17 — Organizing Worksheets Computer Literacy BASICS.
CRSD Technology Training Tony Judice. Quick Access Toolbar – can be modifiedSave as… allows you to save the file to a different location and also as an.
© 2010 Delmar, Cengage Learning Chapter 4 Working with Frames.
INTRODUCTORY Tutorial 5 Using CSS for Layout and Printing.
© 2011 Delmar, Cengage Learning Chapter 4 Working with Frames.
Creating Tables LESSON 6 - #1.06 ESSENTIAL STANDARD #1 - UNDERSTAND WORD PROCESSING INDICATOR #6 – CREATING TABLES.
Key Applications Module Lesson 14 — Working with Tables Computer Literacy BASICS.
Printing Reports. Creating Reports  Reports are the best way to put information from database onto paper, PDF files, and other formats.  In a report,
Positioning Objects with CSS and Tables
XP IT INSTRUCTOR :AHMAD HIRZALLAH 1 Microsoft Office FrontPage 2003 Creating Tables and Frames.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Adding Tables to Slides Lesson 5. Software Orientation Tables are designed to organize data in columns and rows, as shown at right. The Table Tools Design.
Lesson 13 Tables. Overview Create a table. Key and edit text in tables. Select cells, rows, and columns. Edit table structures. Format tables and cell.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 5 1 Microsoft Office FrontPage 2003 Tutorial 5 – Creating Tables and Frames.
Tutorial 4 Using CSS for Page Layout. Objectives Session 4.1 – Explore CSS layout – Compare types of floating layouts – Examine code for CSS layouts –
Microsoft Office 2007-Illustrated Introductory, Windows Vista Edition
Microsoft Office 2007-Illustrated
Key Applications Module Lesson 17 — Organizing Worksheets
Windows Presentation Foundation Layout with Panels
Positioning Objects with CSS and Tables
Building a User Interface with Forms
Chapter A - Getting Started with Dreamweaver MX 2004
Microsoft Office 2007-Illustrated Introductory, Windows Vista Edition
Microsoft Word: Tables
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Layouts AKEEL AHMED.
Exercise 39 - Skills A table on your Web page provides one of the best ways to organize and align graphics, text and other objects on the page. You can.
Tutorial 3 – Creating a Multiple-Page Report
Tutorial 6 Creating Dynamic Pages
DREAMWEAVER MX 2004 Chapter 3 Working with Tables
Lesson 15 Working with Tables
Positioning Objects with CSS and Tables
Key Applications Module Lesson 14 — Working with Tables
Presentation transcript:

Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University

Layout History.NET 1.0 Coordinate-based layout only Anchoring and Docking.NET 2.0 Coordinate-based layout is standard Flow-based layout is optional FlowLayoutPanel and TableLayoutPanel.NET 3.0 and greater Flow-based layout is standard Coordinate-based layout is optional Developers can now create resolution-independent, size-independent interfaces that scale well on different monitors.

The WPF Layout Philosophy WPF window can hold only a single element. You need to place a container in your window and then add other elements to that container. Elements (like controls) should not be explicitly sized. Elements do not indicate their position with screen coordinates. Layout containers can be nested.

The Layout Containers All the WPF layout containers are panels Panel class has 3 public properties: Background, Children, and IsItemHost.

NameDescription StackPanelPlaces elements in a horizontal or vertical stack. This layout container is typically used for small sections of a larger, more complex window. WrapPanelPlaces elements in a series of wrapped lines. In horizontal orientation, the WrapPanel lays items out in a row from left to right and then onto subsequent lines. In vertical orientation, the WrapPanel lays out items in a top-to-bottom column and then uses additional columns to fit the remaining items. DockPanelAligns elements against an entire edge of the container. GridArranges elements in rows and columns according to an invisible table. This is one of the most flexible and commonly used layout containers. UniformGridPlaces elements in an invisible table but forces all cells to have the same size. This layout container is used infrequently. CanvasAllows elements to be positioned absolutely using fixed coordinates. This layout container is the most similar to traditional Windows Forms, but it doesn’t provide anchoring or docking features. As a result, it’s an unsuitable choice for a resizable window unless you’re willing to do a fair bit of work.

StackPanel one of the simplest layout containers simply stacks its children in a single row or column.

Arrange elements horizontally

Layout Properties: Alignment

Layout Properties: Margin To make an extra space between elements Same margin for all sides Different margins for each side of a control in the order left, top, right, bottom:

How Margins are combined

Element Properties: Padding Inserts space between the edges of the control and the edges of the content

WrapPanel

DockPanel

Nesting Layout Containers

Grid The most powerful layout container in WPF Used by Visual Studio when creating a new XAML file. Separates elements into an invisible grid of rows and columns More than one element can be placed in a single cell Element may itself be another layout container that organizes its own group of contained controls: Nesting Layout.

Creating a Grid-based layout 2-step process First, choose the number of columns and rows that you want

Creating a Grid-based layout Second, place individual elements into a cell using the attached Row and Column properties You can place more than one element into a cell If you don’t specify the Grid.Row or Grid.Column property, the Grid assumes that it’s 0.

Example Grid

Sizing Rows and Columns The Grid supports three sizing strategies Absolute sizes Automatic sizes Proportional sizes

Spanning Rows and Columns Make an element stretch over several cells There are 2 attached properties Grid.RowSpan Grid.ColumnSpan Examples:

The Sample Dialog

Splitter In WPF, Splitter bars are represented by the GridSplitter class and are a feature of the Grid Provides the ability to resize rows or columns Always resizes entire rows or columns (not single cells) The GridSplitter must be placed in a Grid cell Horizontal splitter resizes rows Set HorizontalAlignment to Stretch and VerticalAlignment to Center Vertical splitter resizes columns Set VerticalAlignment to Stretch and HorizontalAlignment to Center

Multiple splitters A Grid usually contains no more than a single GridSplitter Use Nested Grid, each Grid has its own GridSplitter

UniformGrid Simply set the Rows and Columns properties to set its size Each cell is always the same size

Canvas

Z-Order To control how they are layered by setting the attached Canvas.ZIndex property when there are more than one overlapping elements. By default, all elements have the same ZIndex – 0 When having the same ZIndex, elements are displayed on the order they’re defined in the XAML With Zindex setting, the higher ZIndex elements always appear over the lower ZIndex elements

Z-Order in Code-Behind Useful if you need to change the position of an element Programmatically. Call Canvas.SetZIndex() Pass in the element you want to modify and the new ZIndex you want to apply.

InkCanvas

InkCanvas: EditingMode NameDescription InkThis is the default mode. When the user draws with the mouse or stylus, a stroke is drawn. SelectTo select an element, the user must click it or drag a selection “lasso” around it. Once an element is selected, it can be moved, resized, or deleted. GestureOnlyDraw stroke annotations but pays attention to specific predefined gestures InkAndGestureThe InkCanvas allows the user to draw stroke annotations and also recognizes predefined gestures. EraseByStrokeThe InkCanvas erases a stroke when it’s clicked. EraseByPointThe InkCanvas erases a portion of a stroke (a point in a stroke) when that portion is clicked. NoneThe InkCanvas ignores mouse and stylus input.

InkCanvas: Select Mode