Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 2.60 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. WPF control positioning problem
  2. <Window x:Class="WpfApplication1.Window1"
  3.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.     Title="Window1"
  6.     Height="300"
  7.     Width="634">
  8. <StackPanel>
  9.     <Button Height="35"
  10.             Width="89"
  11.             Name="p1">Hello</Button>
  12.     <Border CornerRadius="5"
  13.             BorderThickness="1"
  14.             BorderBrush="Black"
  15.             Height="35"
  16.             Width="254"
  17.             Margin="91,192,150,79">
  18.         <TextBox HorizontalAlignment="Left"
  19.                  VerticalAlignment="Center"
  20.                  Background="Transparent"
  21.                  BorderThickness="0"
  22.                  Height="35"
  23.                  Width="250"
  24.                  Name="txtContents" />
  25.     </Border>
  26.     <Button Height="23"
  27.             Name="button1"
  28.             Width="75">Button</Button>
  29. </StackPanel>
  30.        
  31. <Window x:Class="WpfApplication1.Window1"
  32.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  33.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  34.     Title="Window1"
  35.     Height="300"
  36.     Width="634">
  37. <Grid>
  38.     <Button Height="35"
  39.             Width="89"
  40.             Name="p1">Hello</Button>
  41.     <Border CornerRadius="5"
  42.             BorderThickness="1"
  43.             BorderBrush="Black"
  44.             Height="35"
  45.             Width="254"
  46.             Margin="91,192,150,79">
  47.         <TextBox HorizontalAlignment="Left"
  48.                  VerticalAlignment="Center"
  49.                  Background="Transparent"
  50.                  BorderThickness="0"
  51.                  Height="35"
  52.                  Width="250"
  53.                  Name="txtContents" />
  54.     </Border>
  55.     <Button Height="23"
  56.             Name="button1"
  57.             Width="75">Button</Button>
  58. </Grid>
  59.        
  60. <Window x:Class="WpfApplication1.Window1"
  61.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  62.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  63.     Title="Window1"
  64.     Height="300"
  65.     Width="634">
  66. <Grid>
  67.     <Button Height="35"
  68.             Width="89"
  69.             Name="p1">Hello</Button>
  70.     <Border CornerRadius="5"
  71.             BorderThickness="1"
  72.             BorderBrush="Black"
  73.             Height="35"
  74.             Width="254"
  75.             Margin="91,192,150,79">
  76.         <TextBox HorizontalAlignment="Left"
  77.                  VerticalAlignment="Center"
  78.                  Background="Transparent"
  79.                  BorderThickness="0"
  80.                  Height="35"
  81.                  Width="250"
  82.                  Name="txtContents" />
  83.     </Border>
  84.     <Button Height="23"
  85.             Name="button1"
  86.             Width="75">Button</Button>
  87. </Grid>