StackPanel Demo and Canvas : Canvas « Windows Presentation Foundation « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Windows Presentation Foundation » CanvasScreenshots 
StackPanel Demo and Canvas
StackPanel Demo and Canvas
      

<Window x:Class="StackPanelDemo.Canvas"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="StackPanelDemo" Height="423" Width="508"
    >
    <Grid>
      <DockPanel MinHeight="50" MinWidth="50" LastChildFill="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="10,10,22,21" Width="NaN" Height="NaN" Name="dockPanel1">
        <Button Name="button1" DockPanel.Dock="Top">I am the toolbar</Button>
        <Button Name="button2" DockPanel.Dock="Bottom">I am the status bar</Button>
        <Button Name="button3">I am the left toolbox</Button>
        <Button Name="button4" DockPanel.Dock="Right">I am the right toolbox</Button>
        <Canvas>
        <Label Canvas.Left="46" Canvas.Top="18" Name="label1">Label</Label>
        <Button Canvas.Left="135.41" Canvas.Top="71" Name="button5">Button</Button>
        <CheckBox Canvas.Left="31" Canvas.Top="129" Name="checkBox1">CheckBox</CheckBox>
        <CheckBox Canvas.Left="106" Canvas.Top="160" Name="checkBox2">CheckBox</CheckBox>
        <TextBox Canvas.Left="33.41" Canvas.Top="197" Name="textBox1" Width="177" Height="25"></TextBox>
      </Canvas>
      </DockPanel>
    </Grid>
</Window>

   
    
    
    
    
    
  
Related examples in the same category
1.Align Button along with Canvas positionAlign Button along with Canvas position
2.Using a Canvas to absolutely position elementsUsing a Canvas to absolutely position elements
3.Simple CanvasSimple Canvas
4.Canvas with MinHeight and MinWidthCanvas with MinHeight and MinWidth
5.Draws a Path element within a CanvasDraws a Path element within a Canvas
6.Draws several Line elements within a CanvasDraws several Line elements within a Canvas
7.Draws several Polyline elements within a CanvasDraws several Polyline elements within a Canvas
8.Rectangle with Fill and Canvas positionRectangle with Fill and Canvas position
9.Custom Coordinates by transforming the CanvasCustom Coordinates by transforming the Canvas
10.Draw path on a CanvasDraw path on a Canvas
11.Use Canvas coordinationUse Canvas coordination
12.Use Canvas to layout Buttons and LabelsUse Canvas to layout Buttons and Labels
13.Position UI Elements Using Exact CoordinatesPosition UI Elements Using Exact Coordinates
14.Pixel SnappedPixel Snapped
15.Positioning Rectangle on a CanvasPositioning Rectangle on a Canvas
16.Canvas inside canvas, showing relative absolute positioningCanvas inside canvas, showing relative absolute positioning
17.Aligning elements using multiple attached properties of CanvasAligning elements using multiple attached properties of Canvas
18.Layer elements in a Canvas elementLayer elements in a Canvas element
19.Use the four attached properties of the Canvas element: Bottom, Left, Right, and TopUse the four attached properties of the Canvas element: Bottom, Left, Right, and Top
20.Canvas PreviewMouseDown action and MouseDown actionCanvas PreviewMouseDown action and MouseDown action
21.Handles the MouseDown event on the CanvasHandles the MouseDown event on the Canvas
22.StatusBar inside a CanvasStatusBar inside a Canvas
23.Drag Items from a List and Drop Them on a CanvasDrag Items from a List and Drop Them on a Canvas
24.Print Visual(Canvas)Print Visual(Canvas)
25.Get position on a Canvas with Canvas.GetLeftGet position on a Canvas with Canvas.GetLeft
26.Use a Thumb to resize a Canvas control by responding to the DragDelta event.Use a Thumb to resize a Canvas control by responding to the DragDelta event.
27.Canvas Positioning Properties SampleCanvas Positioning Properties Sample
28.Canvas.SetTopCanvas.SetTop
29.Canvas.SetBottomCanvas.SetBottom
30.Canvas.SetRightCanvas.SetRight
31.Add buttons to a Canvas with codeAdd buttons to a Canvas with code
32.Set control position for CanvasSet control position for Canvas
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.