Teil von  SELFPHP
  +++ SELFPHP CronJob-Service :: Jetzt auch als Professional-Version verfügbar! +++

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: SELFPHP Forum ::

Fragen rund um die Themen PHP? In über 120.000 Beiträgen finden Sie sicher die passende Antwort!  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

:: Qozido ::

Die Bilderverwaltung mit Logbuch für Taucher und Schnorchler.   

 
 
Understanding Layout Containers


SELFPHP Produktempfehlung
Microsoft Windows Server 2008
Seite Windows Server 2008
Seite

Microsoft SQL Server 2008
Seite SQL Server 2008
Seite

Microsoft Expression Web 3
Seite Microsoft Expression
Seite


Transforming Vs The Viewbox Control
One of the highlights of the grid control if you recall, was the ability precisely scale elements inside of a grid by scaling the grid itself. We didn’t explore scaling canvases yet though. This is because the process is a bit different, and it gives us a chance to explore another control that is new to Expression Blend 3.

Transforming a Canvas

  1. Choose File > Open Project/Solution and locate the folder in the module03_assets folder named TransformingVsTheViewboxControl and open it. Double-click on the Expression blend file named TransformingVsTheViewboxControl to open the solution.
    Note: If you do not initially see the Design view of a project, you can click on the Projects tab and double-click on MainPage.xaml.
    This project contains two identical layout elements, one of which is a canvas and one of which is a viewbox.
  2. Select the Canvas control in the Objects and Timeline panel.
  3. In the Design view, use the bottom left-hand corner of the canvas to resize it like you did with the grid control earlier. Notice the somewhat surprising result. Instead of resizing the contents, this will only resize the canvas itself.



    The canvas control does not resize child elements

  4. With the canvas element still selected, open up the Transform section of the Properties panel. Select the scale tab. Type 5 into the X and Y fields. The canvas plus the rectangles inside are now five times as big as they were.
  5. Click Edit > Undo Scale Change Y, and Edit > Scale Change X to reset the canvas size. In fact, this is the only way to scale a canvas element in this fashion. The Transform panel can be used to skew, translate, rotate and even adjust elements on a 3D plane.
    It’s important to note that scaling elements produces a display translation. The elements are not actually resized, but are displayed at a percentage of their original values as specified by the RenderTransform XAML element that gets added behind the scenes.

The Viewbox Control
The viewbox control is a new addition to Silverlight 3 projects from the well-established stable of WPF controls. It works a little bit like a canvas, but in fact, it can be combined with a grid to give you the ability to scale child elements like you would with the transform panel, without actually applying a transform.

  1. Select the Viewbox control in the Objects and Timeline panel.
  2. Using the bottom-right hand corner, resize the element in the design view. This result may be a bit more like what you expected to get by resizing the canvas earlier.
    You may also notice that the child element, in this case a grid with a number of rectangles inside will be scaled proportionally, unlike using the transform panel with a canvas.

Self Study
Create a user interface using the controls mentioned in this chapter. Start with a grid and add rows for a header, navigation section, and content section. Use the Stack Panel control for the navigation section, a canvas for the header, and perhaps a nested grid within the content section.



Seite 8 von 8 1 2 3 4 5 6 7 8



Downloads

Copyright © 2010
Microsoft Deutschland GmbH
Alle Rechte vorbehalten.

 Microsoft Deutschland GmbH
 




:: Premium-Partner ::

Webhosting/Serverlösungen


Premium-Partner MECO Systemhaus GmbH & Co. KG
Premium-Partner PSW GROUP GmbH & Co. KG
Premium-Partner BPI-Systeme
Premium-Partner Pixel X
Premium-Partner
 

:: SELFPHP Sponsoren ::


DM Solutions
Microsoft Deutschland GmbH
twosteps.net - ...Premium-Webhosting
Sedo - Bei uns wird PHP großgeschrieben
hostfactory.ch - OptimaNet Schweiz AG
ZEND - The PHP Company
Kaspersky Labs
HighText iBusiness
SELFPHP Sponsoren
 

Qozido


© 2001-2013 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt