Advertisement
jovanovski

КИ Лаб3 XAML

Mar 9th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.87 KB | None | 0 0
  1. <Window x:Class="Lab3.MainWindow"
  2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.        Title="MainWindow" Height="250" Width="525">
  5.     <Grid Name="grid1">
  6.         <Grid.RowDefinitions>
  7.             <RowDefinition></RowDefinition>
  8.         </Grid.RowDefinitions>
  9.         <Grid.ColumnDefinitions>
  10.             <ColumnDefinition></ColumnDefinition>
  11.             <ColumnDefinition></ColumnDefinition>
  12.         </Grid.ColumnDefinitions>
  13.         <ListBox Name="lstBox" Grid.Column="0" Grid.Row="0" DisplayMemberPath="ProductName">
  14.         </ListBox>
  15.         <StackPanel Name="spanel" Grid.Column="1" DataContext="{Binding ElementName=lstBox, Path=SelectedItem}">
  16.             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
  17.                 <Label>Quantity per user:</Label>
  18.                 <TextBox Width="150" Text="{Binding Path=QuantityPerUnit}"></TextBox>
  19.             </StackPanel>
  20.             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
  21.                 <Label>Units in stock:</Label>
  22.                 <TextBox Width="150" Text="{Binding Path=UnitsInStock}"></TextBox>
  23.             </StackPanel>
  24.             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
  25.                 <Label>Unit price:</Label>
  26.                 <TextBox Width="150" Text="{Binding Path=UnitPrice}"></TextBox>
  27.             </StackPanel>
  28.  
  29.             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="200" >
  30.                 <Button Name="btn1" Width="250" Height="70" Click="btn1_Click" >Supplier Detail</Button>
  31.             </StackPanel>
  32.         </StackPanel>
  33.     </Grid>
  34. </Window>
  35.  
  36. <Window x:Class="Lab3.Details"
  37.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  38.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  39.        xmlns:local="clr-namespace:Lab3"
  40.        Title="Details" Height="300" Width="300">
  41.     <Grid>
  42.         <Grid.RowDefinitions>
  43.             <RowDefinition></RowDefinition>
  44.             <RowDefinition></RowDefinition>
  45.             <RowDefinition></RowDefinition>
  46.         </Grid.RowDefinitions>
  47.         <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  48.             <Label>Company name:</Label>
  49.             <TextBox Height="20" Text="{Binding CompanyName}"></TextBox>
  50.         </StackPanel>
  51.         <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
  52.             <Label>Address:</Label>
  53.             <TextBox Height="20" Text="{Binding Address}"></TextBox>
  54.         </StackPanel>
  55.         <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center">
  56.             <Label>City:</Label>
  57.             <TextBox Height="20" Text="{Binding City}"></TextBox>
  58.         </StackPanel>
  59.     </Grid>
  60. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement