Advertisement
Tosker

Vending Machine Tutorial - Window XAML

Nov 28th, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.98 KB | None | 0 0
  1.     <!-- Start of window content -->
  2. <!-- Content from toskerscorner.wordpress.com -->
  3. <Grid Background="LightBlue">
  4.         <Grid.ColumnDefinitions>
  5.             <ColumnDefinition/>
  6.             <ColumnDefinition/>
  7.             <ColumnDefinition/>
  8.             <ColumnDefinition/>
  9.             <ColumnDefinition/>
  10.         </Grid.ColumnDefinitions>
  11.         <Grid.RowDefinitions>
  12.             <RowDefinition/>
  13.             <RowDefinition/>
  14.             <RowDefinition/>
  15.             <RowDefinition/>
  16.             <RowDefinition/>
  17.             <RowDefinition/>
  18.             <RowDefinition/>
  19.         </Grid.RowDefinitions>
  20.  
  21.         <StackPanel Background="Coral" Grid.ColumnSpan="5">
  22.             <TextBlock Style="{StaticResource TitleBlock}">Toskers Vending</TextBlock>
  23.         </StackPanel>
  24.  
  25.         <ListView Style="{StaticResource VendingList}" Grid.Row="1" Grid.ColumnSpan="3" Grid.RowSpan="4">
  26.             <ListView.ItemTemplate>
  27.                 <DataTemplate>
  28.                     <DockPanel>
  29.                         <Button Style="{StaticResource VendingButton}" DockPanel.Dock="Left">
  30.                             Purchase
  31.                         </Button>
  32.                         <StackPanel DockPanel.Dock="Right">
  33.                             <TextBlock Style="{StaticResource CustomerLabel}">Title here</TextBlock>
  34.                             <TextBlock Style="{StaticResource CustomerLabel}">Price here</TextBlock>
  35.                             <TextBlock Foreground="Red" Visibility="Hidden">Out of Stock!</TextBlock>
  36.                         </StackPanel>
  37.                     </DockPanel>
  38.                 </DataTemplate>
  39.             </ListView.ItemTemplate>
  40.         </ListView>
  41.  
  42.         <Button Style="{StaticResource MoneyButton}" Grid.Row="5">
  43.             $0.25
  44.         </Button>
  45.         <Button Style="{StaticResource MoneyButton}" Grid.Row="5" Grid.Column="1">
  46.             $0.50
  47.         </Button>
  48.         <Button Style="{StaticResource MoneyButton}" Grid.Row="5" Grid.Column="2">
  49.             $0.75
  50.         </Button>
  51.  
  52.         <StackPanel Grid.Row="6" Grid.ColumnSpan="3">
  53.             <TextBlock Style="{StaticResource CustomerLabel}">
  54.                 Inserted: $0.00
  55.             </TextBlock>
  56.             <TextBlock Style="{StaticResource CustomerLabel}">
  57.                 Change: $0.00
  58.             </TextBlock>
  59.         </StackPanel>
  60.  
  61.         <DockPanel Margin="5" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" Grid.RowSpan="3" Background="BlanchedAlmond">
  62.             <TextBlock DockPanel.Dock="Top" FontSize="28" Style="{StaticResource CustomerLabel}" HorizontalAlignment="Center">Inventory</TextBlock>
  63.             <StackPanel DockPanel.Dock="Bottom">
  64.                 <TextBlock Margin="5" Style="{StaticResource CustomerLabel}" FontSize="16">
  65.                     Regular Cola: 0
  66.                 </TextBlock>
  67.                 <TextBlock Margin="5" Style="{StaticResource CustomerLabel}" FontSize="16">
  68.                     Diet Cola: 0
  69.                 </TextBlock>
  70.                 <TextBlock Margin="5" Style="{StaticResource CustomerLabel}" FontSize="16">
  71.                     Orange Cola: 0
  72.                 </TextBlock>
  73.                 <TextBlock Margin="5" Style="{StaticResource CustomerLabel}" FontSize="16">
  74.                     Grape Cola: 0
  75.                 </TextBlock>
  76.             </StackPanel>
  77.         </DockPanel>
  78.  
  79.         <StackPanel Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Grid.RowSpan="3" Background="DarkKhaki">
  80.             <TextBlock DockPanel.Dock="Top" FontSize="28" Style="{StaticResource CustomerLabel}" HorizontalAlignment="Center">Manager</TextBlock>
  81.             <Button Style="{StaticResource ManagerButton}">
  82.                 Refill Supply
  83.             </Button>
  84.             <Button Style="{StaticResource ManagerButton}">
  85.                 Empty Supply
  86.             </Button>
  87.             <Button Style="{StaticResource ManagerButton}">
  88.                 Withdraw Payment
  89.             </Button>
  90.         </StackPanel>
  91.     </Grid>
  92.     <!-- End of window content -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement