<Window x:Class="AsystentZakupówWPF.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:AsystentZakupówWPF"
        xmlns:mw="clr-namespace:AsystentZakupówWPF.ModelWidoku"
        mc:Ignorable="d"
        ResizeMode = "NoResize"
        Title="Asystent zakupów" Height="200" Width="200">
    <Window.Resources>
        <local:BoolToBrushConverter x:Key="boolToBrush" />
    </Window.Resources>
    <Window.DataContext>
        <mw:ModelWidoku />
    </Window.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <TextBlock HorizontalAlignment="Left" Grid.Row="0"
                   FontSize="25" Foreground="Navy" Margin="10">
            Suma: 
            <Run Foreground="Black" FontFamily="Courier New" 
                 Text="{Binding Path=Suma, Mode=OneWay}" />
        </TextBlock>
        <TextBox x:Name="tbKwota" FontSize="30" FontFamily="Courier New" 
                 TextAlignment="Right" Margin="10" Grid.Row="1" Text="0" 
                 Foreground="{Binding ElementName=btnDodaj, Path=IsEnabled, Mode=OneWay, Converter={StaticResource boolToBrush}}" />
        <Button x:Name="btnDodaj" Content="Dodaj" FontSize="20" Margin="10"
                Grid.Row="2" Command="{Binding DodajKwotę}" 
                CommandParameter="{Binding ElementName=tbKwota, Path=Text}" />
    </Grid>
</Window>
