-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
64 lines (50 loc) · 2.58 KB
/
MainWindow.xaml
File metadata and controls
64 lines (50 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<Window x:Class="ProjectDataWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProjectDataWPF"
xmlns:vm="clr-namespace:ProjectDataWPF.ViewModels"
xmlns:uc="clr-namespace:ProjectDataWPF.Views"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--<StackPanel x:Name="Test" Margin="20">
<uc:LimitedInputView Title="Product #:" MaxLength="16" Height="50" />
<uc:LimitedInputView Title="Product Name:" MaxLength="20" Height="50" />
</StackPanel>-->
<ComboBox Grid.Column="2" Grid.Row="1" Margin="100,70,0,0" DisplayMemberPath="CategoryName" ItemsSource="{Binding Categories}"/>
<TextBlock FontSize="32" Grid.Column="2" Text="{Binding Categories.Count}"/>
<ListBox Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="1" DisplayMemberPath="CategoryName" ItemsSource="{Binding Categories}" />
<Button Grid.Column="1" x:Name="btnGetCategories"
HorizontalAlignment="Center" Content="Get Categories" Command="{Binding Path=GetCategoriesCommand}"/>
<DataGrid ItemsSource="{Binding Products}" />
<!--<TextBlock HorizontalAlignment="Center" FontWeight="DemiBold">Customer Information</TextBlock>
<Label Content="{Binding CustomerNumber}" />
<Label Content="{Binding CustomerName}" />
<Label Content="{Binding CustomerAge}" />
<Label Content="{Binding CustomerAddress1}" />
<Label Content="{Binding CustomerAddress2}" />
<Label Content="{Binding CustomerMobileNumber}" />-->
</Grid>
<Window.DataContext>
<vm:CategoryViewModel />
</Window.DataContext>
<Window.Resources>
<Style TargetType="Button">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="10"/>
<Setter Property="Width" Value="200"/>
<Setter Property="Height" Value="50"/>
</Style>
</Window.Resources>
</Window>