Add project files.
This commit is contained in:
45
Views/MainWindow.xaml
Normal file
45
Views/MainWindow.xaml
Normal file
@@ -0,0 +1,45 @@
|
||||
<Window x:Class="MVVM_DEMO.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:MVVM_DEMO"
|
||||
xmlns:vm="clr-namespace:MVVM_DEMO.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow"
|
||||
Height="450"
|
||||
Width="800">
|
||||
<Window.DataContext>
|
||||
<vm:MainViewModel />
|
||||
</Window.DataContext>
|
||||
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<ComboBox x:Name="comboBox"
|
||||
Width="200"
|
||||
Height="30"
|
||||
Margin="10"
|
||||
VerticalAlignment="Top"
|
||||
ItemsSource="{Binding Products}"
|
||||
DisplayMemberPath="ProductName" />
|
||||
<Button x:Name="btnAddProduct"
|
||||
Content="Add Product"
|
||||
Width="100px"
|
||||
Height="25px"
|
||||
Click="btnAddProduct_Click" />
|
||||
<Label Content="Selected Product Details"
|
||||
FontWeight="Bold"
|
||||
FontSize="16"
|
||||
Margin="10" />
|
||||
<TextBox x:Name="txtProductName"
|
||||
Width="200"
|
||||
Height="30"
|
||||
Text="{Binding productName}"
|
||||
/>
|
||||
<TextBox x:Name="txtProductPrice"
|
||||
Width="200"
|
||||
Height="30"
|
||||
Text="{Binding productPrice}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user