SlideShare uma empresa Scribd logo
1 de 30
Windows 8:
Shapes and Geometries – Part
2
Shapes and Geometries – Part
2 http://www.LearnNowOnline.com



        Learn More @ http://www.learnnowonline.com
        Copyright © by Application Developers Training Company
Objectives
• Learn to use basic shapes: lines, ellipses,
  rectangles, and polygons
• Add line caps and joins
• Work with geometries and paths
• Investigate the geometry mini-language




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Agenda
• Working with Shapes
• Digging Deeper: Using Paths and
  Geometries




           Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Using Paths and Geometries
• Geometry class abstract, so must use:
  • EllipseGeometry, LineGeometry,
    RectangleGeometry
  • PathGeometry (can contain arcs, curves, lines)
  • GeometryGroup
     • Allows you to add any number of Geometry objects to a
      single Path




               Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Paths vs Geometries?
• Why both paths and geometries?
  • Geometry defines a single shape
     • Coordinates and properties
     • Doesn’t draw the shape
  • Path can group shapes
     • Allows you to draw the shape(s)

• Path provides Stroke and Fill
  • Also handles mouse and keyboard handling


               Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Ellipse, Line, RectangleGeometry
• Work much like Ellipse, Line, Rectangle shapes
• EllipseGeometry defines Center and Radius
  rather than width and height
• Real power comes in combining within Path




             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
DEMO
• SimpleGeometries




            Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Using GeometryGroup Element
• Create several shapes that share fill and stroke
  characteristics?
• Place within single Path element, using
  GeometryGroup element
• All shapes in group share fill and stroke
• No z-order implications—all borders show



             Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Using GeometryGroup Element
• GeometryGroup provides FillRule, treating
  entire group as a single "drawing"
• Using GeometryGroup reduces element count
  • Optimizes XAML slightly




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
DEMO
• GeometryGroup




           Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Curves/Lines with PathGeometry
• Need to draw curves and specific shapes that
  don't fit other categories?
  • Use PathGeometry
• Can contain one or more PathFigure elements
  • Each PathFigure contains information about one or
    more segments
  • Segment can be line, or curve
• PathFigure properties: IsClosed, IsFilled,
  Segments, StartPoint
              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
PathFigure Properties
• IsClosed: Determines if first and last segments
  are connected
• IsFilled: Determines if contained area should
  be filled using brush in Path.Fill
• Segments: Collection of segments that define
  the shape; collection of PathSegment objects
• StartPoint: Determines the starting point for
  PathFigure
             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Segment Types
• ArcSegment
• BezierSegment, PolyBezierSegment
• QuadraticBezierSegment,
  PolyQuadraticBezierSegment
• LineSegment, PolyLineSegment




            Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
PathGeometry Markup
• PathGeometry element<Path.Data>
                       <Path …>

  generally looks like     <PathGeometry>
                             <PathFigure … >
  this:                         <LineSegment …                />
                                               <ArcSegment … />
                                             </PathFigure>
                                             <PathFigure … />
                                           </PathGeometry>
                                         </Path.Data>
                                       </Path>




              Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
DEMO
• PathGeometryLines




           Learn More @ http://www.learnnowonline.com
            Copyright © by Application Developers Training Company
Working with Lines
• Path describes Fill, Stroke, StrokeThickness for
  entire path; also contains StrokeLineJoin and
  StrokeEndLineCap
• PathGeometry contains FillRule
• PathFigure maintains StartPoint
• Continuous line segments could be
  represented as PolyLineSegment


              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Arcs
• ArcSegment element defines an elliptical arc
• Many different ways to describe portion of
  ellipse; must study various properties
• PathFigure defines start point, ArcSegment
  defines end point in its Point property




             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Working with Arcs
• X and Y radius in Size property as ordered pair
• RotationAngle defines rotation
• IsLargeArc: Using large or small portion or
  ellipse?
• SweepDirection: Clockwise?




             Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
DEMO
• PathGeometryArcs




           Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Working with Curves
• Bezier curves provide basis for almost every
  vector drawing program
  • Make it possible to define almost any curve
  • Two end points, two control points
  • Quadratic Bezier uses only three points (only one
    control point)
     • Not as flexible, but easier to define and calculate




                Learn More @ http://www.learnnowonline.com
                Copyright © by Application Developers Training Company
Working with Curves
• Four points define standard Bezier curve
  • Start point
  • End point (Point3 property)
  • Two control points (Point1 and Point2 properties)
• No specific start point:
  • Parent PathFigure defines start point
  • BezierSegment defines two control points and end
    point

              Learn More @ http://www.learnnowonline.com
                  Copyright © by Application Developers Training Company
Working with Curves
• At starting point, curve runs parallel to line
  connecting start point and first control point
• At ending point, curve runs parallel to line
  connecting end point to second control point
• In between two points, line curves




             Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Working with Curves
• Farther control point is from line, greater the
  curvature




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
Important Tip
• Don't create Bezier curves by trial and error
• Use a tool that helps generate XAML for you
  • Expression Blend!




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
DEMO
• PathGeometryCurves




           Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Geometry Mini-Language
• Imagine scenario with lots of shapes
• Tons of markup!
• To reduce markup, can use mini markup
  language that describes geometry
  • Called Geometry mini-language or Path mini-
    language
• Design tools will create this
  • Must be able to recognize and try to interpret

               Learn More @ http://www.learnnowonline.com
               Copyright © by Application Developers Training Company
Geometry Mini-Language
• Converts from this:




• To this:

             Learn More @ http://www.learnnowonline.com
             Copyright © by Application Developers Training Company
Geometry Mini-Language
• For full description:
  • http://msdn.microsoft.com/en-
    us/library/ms752293.aspx




              Learn More @ http://www.learnnowonline.com
              Copyright © by Application Developers Training Company
DEMO
• GeometryMiniLanguage




           Learn More @ http://www.learnnowonline.com
           Copyright © by Application Developers Training Company
Questions?

   http://www.LearnNowOnline.com




        Learn More @ http://www.learnnowonline.com
        Copyright © by Application Developers Training Company

Mais conteúdo relacionado

Semelhante a Windows 8: Shapes and Geometries

Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5LearnNowOnline
 
Bring a Web Page Alive with jQuery
Bring a Web Page Alive with jQueryBring a Web Page Alive with jQuery
Bring a Web Page Alive with jQueryLearnNowOnline
 
Asynchronous Programming
Asynchronous ProgrammingAsynchronous Programming
Asynchronous ProgrammingLearnNowOnline
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Dimitri de Putte
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET FrameworkLearnNowOnline
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collectionsLearnNowOnline
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Gáspár Nagy
 
JavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsJavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsLearnNowOnline
 
Selenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applicationsSelenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applicationsTSundberg
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDELearnNowOnline
 
Amizoner Presentation
Amizoner PresentationAmizoner Presentation
Amizoner PresentationNeil Mathew
 
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer story
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer storyAWS Stockholm Meetup June 2019 - Cybercom DeepRacer story
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer storyRolf Koski
 
EmberJS BucharestJS
EmberJS BucharestJSEmberJS BucharestJS
EmberJS BucharestJSRemus Rusanu
 
How to successfully publish an app on app source
How to successfully publish an app on app sourceHow to successfully publish an app on app source
How to successfully publish an app on app sourceGunnar Gestsson
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1Fons Sonnemans
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Gáspár Nagy
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
SpringPeople Introduction to HTML5 & CSS3
SpringPeople Introduction to HTML5 & CSS3SpringPeople Introduction to HTML5 & CSS3
SpringPeople Introduction to HTML5 & CSS3SpringPeople
 

Semelhante a Windows 8: Shapes and Geometries (20)

Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5Building Windows 8 Metro Style Applications Using JavaScript and HTML5
Building Windows 8 Metro Style Applications Using JavaScript and HTML5
 
Bring a Web Page Alive with jQuery
Bring a Web Page Alive with jQueryBring a Web Page Alive with jQuery
Bring a Web Page Alive with jQuery
 
Asynchronous Programming
Asynchronous ProgrammingAsynchronous Programming
Asynchronous Programming
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012
 
Using The .NET Framework
Using The .NET FrameworkUsing The .NET Framework
Using The .NET Framework
 
Managing site collections
Managing site collectionsManaging site collections
Managing site collections
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
 
JavaScript: Operators and Expressions
JavaScript: Operators and ExpressionsJavaScript: Operators and Expressions
JavaScript: Operators and Expressions
 
Selenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applicationsSelenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applications
 
The Entity Data Model
The Entity Data ModelThe Entity Data Model
The Entity Data Model
 
New in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDENew in the Visual Studio 2012 IDE
New in the Visual Studio 2012 IDE
 
Amizoner Presentation
Amizoner PresentationAmizoner Presentation
Amizoner Presentation
 
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer story
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer storyAWS Stockholm Meetup June 2019 - Cybercom DeepRacer story
AWS Stockholm Meetup June 2019 - Cybercom DeepRacer story
 
EmberJS BucharestJS
EmberJS BucharestJSEmberJS BucharestJS
EmberJS BucharestJS
 
How to successfully publish an app on app source
How to successfully publish an app on app sourceHow to successfully publish an app on app source
How to successfully publish an app on app source
 
What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1What’s new in XAML and Tooling for Windows 8.1
What’s new in XAML and Tooling for Windows 8.1
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
Generics
GenericsGenerics
Generics
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
SpringPeople Introduction to HTML5 & CSS3
SpringPeople Introduction to HTML5 & CSS3SpringPeople Introduction to HTML5 & CSS3
SpringPeople Introduction to HTML5 & CSS3
 

Mais de LearnNowOnline

SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionLearnNowOnline
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingLearnNowOnline
 
Object oriented techniques
Object oriented techniquesObject oriented techniques
Object oriented techniquesLearnNowOnline
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScriptLearnNowOnline
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document ManagementLearnNowOnline
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathLearnNowOnline
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programmingLearnNowOnline
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5LearnNowOnline
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCLearnNowOnline
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignLearnNowOnline
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity FrameworkLearnNowOnline
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCLearnNowOnline
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVCLearnNowOnline
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User InterfaceLearnNowOnline
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow controlLearnNowOnline
 

Mais de LearnNowOnline (20)

SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
 
A tour of SQL Server
A tour of SQL ServerA tour of SQL Server
A tour of SQL Server
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
Object oriented techniques
Object oriented techniquesObject oriented techniques
Object oriented techniques
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
SharePoint Document Management
SharePoint Document ManagementSharePoint Document Management
SharePoint Document Management
 
SharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPathSharePoint: Introduction to InfoPath
SharePoint: Introduction to InfoPath
 
Web API HTTP Pipeline
Web API HTTP PipelineWeb API HTTP Pipeline
Web API HTTP Pipeline
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
SQL Server: Security
SQL Server: SecuritySQL Server: Security
SQL Server: Security
 
Sql 2012 development and programming
Sql 2012  development and programmingSql 2012  development and programming
Sql 2012 development and programming
 
What's new in Silverlight 5
What's new in Silverlight 5What's new in Silverlight 5
What's new in Silverlight 5
 
KnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVCKnockOutJS with ASP.NET MVC
KnockOutJS with ASP.NET MVC
 
Expression Blend Motion & Interaction Design
Expression Blend Motion & Interaction DesignExpression Blend Motion & Interaction Design
Expression Blend Motion & Interaction Design
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Working with Controllers and Actions in MVC
Working with Controllers and Actions in MVCWorking with Controllers and Actions in MVC
Working with Controllers and Actions in MVC
 
Creating a User Interface
Creating a User InterfaceCreating a User Interface
Creating a User Interface
 
.Net branching and flow control
.Net branching and flow control.Net branching and flow control
.Net branching and flow control
 

Último

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Windows 8: Shapes and Geometries

  • 1. Windows 8: Shapes and Geometries – Part 2 Shapes and Geometries – Part 2 http://www.LearnNowOnline.com Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 2. Objectives • Learn to use basic shapes: lines, ellipses, rectangles, and polygons • Add line caps and joins • Work with geometries and paths • Investigate the geometry mini-language Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 3. Agenda • Working with Shapes • Digging Deeper: Using Paths and Geometries Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 4. Using Paths and Geometries • Geometry class abstract, so must use: • EllipseGeometry, LineGeometry, RectangleGeometry • PathGeometry (can contain arcs, curves, lines) • GeometryGroup • Allows you to add any number of Geometry objects to a single Path Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 5. Paths vs Geometries? • Why both paths and geometries? • Geometry defines a single shape • Coordinates and properties • Doesn’t draw the shape • Path can group shapes • Allows you to draw the shape(s) • Path provides Stroke and Fill • Also handles mouse and keyboard handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 6. Ellipse, Line, RectangleGeometry • Work much like Ellipse, Line, Rectangle shapes • EllipseGeometry defines Center and Radius rather than width and height • Real power comes in combining within Path Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 7. DEMO • SimpleGeometries Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 8. Using GeometryGroup Element • Create several shapes that share fill and stroke characteristics? • Place within single Path element, using GeometryGroup element • All shapes in group share fill and stroke • No z-order implications—all borders show Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 9. Using GeometryGroup Element • GeometryGroup provides FillRule, treating entire group as a single "drawing" • Using GeometryGroup reduces element count • Optimizes XAML slightly Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 10. DEMO • GeometryGroup Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 11. Curves/Lines with PathGeometry • Need to draw curves and specific shapes that don't fit other categories? • Use PathGeometry • Can contain one or more PathFigure elements • Each PathFigure contains information about one or more segments • Segment can be line, or curve • PathFigure properties: IsClosed, IsFilled, Segments, StartPoint Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 12. PathFigure Properties • IsClosed: Determines if first and last segments are connected • IsFilled: Determines if contained area should be filled using brush in Path.Fill • Segments: Collection of segments that define the shape; collection of PathSegment objects • StartPoint: Determines the starting point for PathFigure Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 13. Segment Types • ArcSegment • BezierSegment, PolyBezierSegment • QuadraticBezierSegment, PolyQuadraticBezierSegment • LineSegment, PolyLineSegment Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 14. PathGeometry Markup • PathGeometry element<Path.Data> <Path …> generally looks like <PathGeometry> <PathFigure … > this: <LineSegment … /> <ArcSegment … /> </PathFigure> <PathFigure … /> </PathGeometry> </Path.Data> </Path> Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 15. DEMO • PathGeometryLines Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 16. Working with Lines • Path describes Fill, Stroke, StrokeThickness for entire path; also contains StrokeLineJoin and StrokeEndLineCap • PathGeometry contains FillRule • PathFigure maintains StartPoint • Continuous line segments could be represented as PolyLineSegment Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 17. Working with Arcs • ArcSegment element defines an elliptical arc • Many different ways to describe portion of ellipse; must study various properties • PathFigure defines start point, ArcSegment defines end point in its Point property Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 18. Working with Arcs • X and Y radius in Size property as ordered pair • RotationAngle defines rotation • IsLargeArc: Using large or small portion or ellipse? • SweepDirection: Clockwise? Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 19. DEMO • PathGeometryArcs Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 20. Working with Curves • Bezier curves provide basis for almost every vector drawing program • Make it possible to define almost any curve • Two end points, two control points • Quadratic Bezier uses only three points (only one control point) • Not as flexible, but easier to define and calculate Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 21. Working with Curves • Four points define standard Bezier curve • Start point • End point (Point3 property) • Two control points (Point1 and Point2 properties) • No specific start point: • Parent PathFigure defines start point • BezierSegment defines two control points and end point Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 22. Working with Curves • At starting point, curve runs parallel to line connecting start point and first control point • At ending point, curve runs parallel to line connecting end point to second control point • In between two points, line curves Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 23. Working with Curves • Farther control point is from line, greater the curvature Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 24. Important Tip • Don't create Bezier curves by trial and error • Use a tool that helps generate XAML for you • Expression Blend! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 25. DEMO • PathGeometryCurves Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 26. Geometry Mini-Language • Imagine scenario with lots of shapes • Tons of markup! • To reduce markup, can use mini markup language that describes geometry • Called Geometry mini-language or Path mini- language • Design tools will create this • Must be able to recognize and try to interpret Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 27. Geometry Mini-Language • Converts from this: • To this: Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 28. Geometry Mini-Language • For full description: • http://msdn.microsoft.com/en- us/library/ms752293.aspx Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 29. DEMO • GeometryMiniLanguage Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
  • 30. Questions? http://www.LearnNowOnline.com Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company