MainPage.xaml 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <Page x:Class="Namordnik.Pages.MainPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Namordnik.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="900" d:DesignWidth="750"
  9. Title="MainPage" MaxWidth="750" MaxHeight="900" MinHeight="900" MinWidth="750">
  10. <Page.Resources>
  11. <BitmapImage x:Key="defaulimage" UriSource="/Resources/picture.png"></BitmapImage>
  12. </Page.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="170"></RowDefinition>
  16. <RowDefinition Height="470" ></RowDefinition>
  17. <RowDefinition ></RowDefinition>
  18. </Grid.RowDefinitions>
  19. <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Center">
  20. <Image Source="/Resources/Намордник.png" Height="80" Width="80"></Image>
  21. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" >Намордник</TextBlock>
  22. </StackPanel>
  23. <StackPanel Height="50" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,25" Orientation="Horizontal">
  24. <TextBox Name="TBFilter" TextChanged="TBFilter_TextChanged" Width="380" Height="25" Margin="10,0,30,0"></TextBox>
  25. <ComboBox Name="CBSort" Width="150" Height="25" Margin="0,0,30,0"></ComboBox>
  26. <ComboBox Name="CBFilter" SelectionChanged="CBFilter_SelectionChanged" Width="150" Height="25" Margin="0,0,0,0"></ComboBox>
  27. </StackPanel>
  28. <StackPanel VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" >
  29. <Button Width="380" Height="25" Margin="0,0,30,0" Name="WRDoc" Click="WRDoc_Click" Visibility="Visible">Экспрот в Word</Button>
  30. <Button Width="380" Height="25" Margin="0,0,30,0" Name="Changed" Click="Changed_Click" Visibility="Collapsed">Изменить стоимость на...</Button>
  31. <Button Width="60" Height="25" Margin="0,0,30,0" Name="BtnSortUp" Click="BtnSortUp_Click">По возр.</Button>
  32. <Button Width="60" Height="25" Margin="0,0,30,0" Name="BtnSortDown" Click="BtnSortDown_Click">По убыв.</Button>
  33. <Button Width="150" Height="25" Name="BtnAdd" Click="BtnAdd_Click">Добавить продукцию</Button>
  34. </StackPanel>
  35. <ListView Name="LVProdMat" SelectionMode="Multiple" SelectionChanged="LVProdMat_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.Row="1" BorderThickness="0">
  36. <ListView.ItemsPanel >
  37. <ItemsPanelTemplate>
  38. <WrapPanel HorizontalAlignment="Center"></WrapPanel>
  39. </ItemsPanelTemplate>
  40. </ListView.ItemsPanel>
  41. <ListView.ItemTemplate>
  42. <DataTemplate>
  43. <Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="#FDBD40" Background="{Binding PrColor}">
  44. <Grid Width="700" Height="65">
  45. <StackPanel Orientation="Horizontal">
  46. <Image Margin="0,0,20,0" Source="{Binding Image,TargetNullValue={StaticResource defaulimage}}" Height="50" Width="70"/>
  47. <StackPanel Orientation="Vertical">
  48. <TextBlock Text="{Binding Header}"></TextBlock>
  49. <TextBlock Text="{Binding ArticleNumber, StringFormat={}Артикул: {0}}"></TextBlock>
  50. <TextBlock Loaded="TextBlock_Loaded" Uid="{Binding ID}" Width="520" TextWrapping="Wrap"></TextBlock>
  51. </StackPanel>
  52. </StackPanel>
  53. <StackPanel HorizontalAlignment="Right">
  54. <TextBlock Loaded="TextBlock_Loaded_1" Uid="{Binding ID}"></TextBlock>
  55. </StackPanel>
  56. <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
  57. <Button Name="BtnRed" Uid="{Binding ID}" Click="BtnRed_Click" Width="90" Height="20" >Редактировать</Button>
  58. </StackPanel>
  59. </Grid>
  60. </Border>
  61. </DataTemplate>
  62. </ListView.ItemTemplate>
  63. </ListView>
  64. <StackPanel Grid.Row="2">
  65. <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center">
  66. <TextBlock Name="txtPrev" Uid="prev" Text=" Пред." MouseDown="GoPage_MouseDown" />
  67. <TextBlock Name="txt1" Uid="1" Text="{Binding Path = NPage[0], StringFormat={}{0,3}}" Visibility="{Binding Visible[0]}" FontWeight="{Binding Bold[0]}" MouseDown="GoPage_MouseDown" />
  68. <TextBlock Name="txt2" Uid="2" Text="{Binding Path = NPage[1], StringFormat={}{0,3}}" Visibility="{Binding Visible[1]}" FontWeight="{Binding Bold[1]}" MouseDown="GoPage_MouseDown" />
  69. <TextBlock Name="txt3" Uid="3" Text="{Binding Path = NPage[2], StringFormat={}{0,3}}" Visibility="{Binding Visible[2]}" FontWeight="{Binding Bold[2]}" MouseDown="GoPage_MouseDown" />
  70. <TextBlock Name="txt4" Uid="4" Text="{Binding Path = NPage[3], StringFormat={}{0,3}}" Visibility="{Binding Visible[3]}" FontWeight="{Binding Bold[3]}" MouseDown="GoPage_MouseDown" />
  71. <TextBlock Name="txtNext" Uid="next" Text=" След." MouseDown="GoPage_MouseDown" />
  72. </WrapPanel>
  73. </StackPanel>
  74. </Grid>
  75. </Page>