Adding Rectangle to StackPanel : Rectangle « Windows Presentation Foundation « C# / C Sharp






Adding Rectangle to StackPanel

Adding Rectangle to StackPanel
      

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Glyphs and Fonts" Height="300" Width="350"
    >
  <StackPanel>
        <Rectangle  Width="200"  Height="50" />
  </StackPanel>
</Window>

   
    
    
    
    
    
  








Related examples in the same category

1.A rectangle with curved cornersA rectangle with curved corners
2.Paints a rectangle with a grid pattern with VisualBrushPaints a rectangle with a grid pattern with VisualBrush
3.Paints a rectangle with a checkered pattern.Paints a rectangle with a checkered pattern.
4.Paints a rectangle with a grid patternPaints a rectangle with a grid pattern
5.Two of the drawing's rectangles are painted with an ImageBrush, creating a checkered pattern of imagesTwo of the drawing's rectangles are painted with an ImageBrush, creating a checkered pattern of images
6.Fill rectangle with Rectangle.Fill tag and LinearGradientBrushFill rectangle with Rectangle.Fill tag and LinearGradientBrush
7.Pulsating RectanglePulsating Rectangle
8.Rectangle Geometry DemoRectangle Geometry Demo
9.Rounded Rectangle Corner radius of 5Rounded Rectangle Corner radius of 5
10.Rounded Rectangle Corner radius of 10 (X) and 25 (Y)Rounded Rectangle Corner radius of 10 (X) and 25 (Y)
11.Rounded Rectangle Corner radius of 100 (X) and 60 (Y)Rounded Rectangle Corner radius of 100 (X) and 60 (Y)
12.A rectangle with a rotate transformationA rectangle with a rotate transformation
13.Trigger animation with Rectangle.MouseEnterTrigger animation with Rectangle.MouseEnter
14.Trigger animation with Rectangle.MouseLeaveTrigger animation with Rectangle.MouseLeave
15.Rectangle.Fill with ImageBrush
16.Create rectangles in WPF.Create rectangles in WPF.
17.Rectangle mouse down eventRectangle mouse down event
18.Rectangle mouse down previewRectangle mouse down preview
19.Change HeightChange Height
20.Change MinHeightChange MinHeight
21.Change MaxHeightChange MaxHeight