MainWindow.xaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <Window x:Class="Rkis29.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Rkis29" xmlns:converters="clr-namespace:Rkis29.Converter" xmlns:viewmodel="clr-namespace:Rkis29.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:VMAutor}"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Name="MainWnd" Height="400" Width="500">
  9. <Window.Resources>
  10. <converters:Converter x:Key="Converter"></converters:Converter>
  11. </Window.Resources>
  12. <Grid>
  13. <Grid>
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="19*"/>
  16. <ColumnDefinition Width="auto" MinWidth="108"/>
  17. <ColumnDefinition Width="auto" MinWidth="375"/>
  18. <ColumnDefinition Width="24*"/>
  19. <ColumnDefinition Width="24*"/>
  20. </Grid.ColumnDefinitions>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="100*"/>
  23. <RowDefinition Height="50*"/>
  24. <RowDefinition Height="50*"/>
  25. <RowDefinition Height="50*"/>
  26. <RowDefinition Height="50*"/>
  27. <RowDefinition Height="50*"/>
  28. <RowDefinition Height="100*"/>
  29. </Grid.RowDefinitions>
  30. <Label Grid.Row="1" Grid.Column="2" Content="Авторизация" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" Height="40" Width="142" Margin="90,0,0,0"/>
  31. <TextBox Grid.Row="2" Grid.Column="2" x:Name="Login" Text="{Binding Login}" FontSize="16" HorizontalAlignment="Left" Width="244" Height="38" VerticalAlignment="Bottom" Cursor="Arrow" Margin="29,0,0,4"/>
  32. <PasswordBox Grid.Row="3" Grid.Column="2" x:Name="Password" FontSize="16" HorizontalAlignment="Left" Width="244" Height="34" VerticalAlignment="Center" Cursor="Arrow" Margin="29,0,0,0"/>
  33. <TextBlock Grid.Row="2" Grid.Column="1" Height="20" Width="60" Text="Логин:" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" Margin="48,0,0,0"/>
  34. <TextBlock Grid.Row="3" Grid.Column="1" Height="20" Width="60" Text="Пароль:" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" Margin="48,0,0,0"/>
  35. <Button Grid.Row="4" Grid.Column="2" Content="Войти" Command="{Binding Autho_ready}" FontSize="14" Margin="29,0,0,0" HorizontalAlignment="Left" Width="122" Cursor="Hand" RenderTransformOrigin="-0.102,0.514" Height="28" VerticalAlignment="Center" Click="Button_Click">
  36. <Button.CommandParameter>
  37. <MultiBinding Converter= "{StaticResource Converter}">
  38. <Binding ElementName="Password"></Binding>
  39. <Binding ElementName="MainWnd"></Binding>
  40. </MultiBinding>
  41. </Button.CommandParameter>
  42. </Button>
  43. <Button Grid.Row="4" Grid.Column="2" Content="Регистрация" Command="{Binding RegistrWND}" CommandParameter="{Binding ElementName=MainWnd}" VerticalAlignment="Center" FontSize="14" Height="28" Margin="156,0,0,0" Cursor="Hand" RenderTransformOrigin="1.137,0.639" HorizontalAlignment="Left" Width="117"/>
  44. </Grid>
  45. </Grid>
  46. </Window>