123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <UserControl xmlns="https://github.com/avaloniaui"
- 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"
- mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="990"
- x:Class="AvaloniaApplication4.Views.ActionPages.AllPrograms"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:AllProgramsViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <TextBlock Margin="0 0 0 36" Text="Программы" Classes="titleStyle" FontWeight="Bold"/>
- <Button Content="Добавить новую программу" Command="{Binding $parent[UserControl].((vm:AllProgramsViewModel)DataContext).AddProgram}" HorizontalAlignment="Stretch" Margin="0 0 0 23"/>
- <StackPanel IsVisible="{Binding IsVisibleFirst}" Orientation="Vertical" Margin="0 0 0 36" HorizontalAlignment="Stretch">
- <TextBlock FontWeight="Bold" Text="Запущенные программы" Margin="0 0 0 36"/>
- <StackPanel Margin="0 0 0 36" Orientation="Horizontal" HorizontalAlignment="Stretch">
- <TextBox Text="{Binding SearchProgramsRun, Mode=TwoWay}" Width="400" TextWrapping="NoWrap" Height="52" Watermark="Найдите нужную программу" HorizontalAlignment="Stretch"/>
- <Button Height="52" Width="52">
- <Image Source="/Assets/Images/searchIcon.png"/>
- </Button>
- </StackPanel>
- <ListBox ItemsSource="{Binding ProgramsRun}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Classes="mediumText" Text="{Binding IdProgramTemplateNavigation.NameProgram}" Grid.Column="0" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- <Button Content="Редактировать" Command="{Binding $parent[UserControl].((vm:AllProgramsViewModel)DataContext).EditAndAddProgram}" CommandParameter="{Binding IdRunningPrograms}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- <StackPanel IsVisible="{Binding IsVisibleSecond}" Orientation="Vertical" HorizontalAlignment="Stretch">
- <TextBlock FontWeight="Bold" Text="Не запущенные программы" Margin="0 0 0 36"/>
- <StackPanel Margin="0 0 50 10" Orientation="Horizontal" HorizontalAlignment="Stretch">
- <TextBox Text="{Binding SearchProgramsNotRun, Mode=TwoWay}" Width="400" TextWrapping="NoWrap" Height="52" Watermark="Найдите нужную программу" HorizontalAlignment="Stretch"/>
- <Button Height="52" Width="52">
- <Image Source="/Assets/Images/searchIcon.png"/>
- </Button>
- </StackPanel>
- <ListBox ItemsSource="{Binding ProgramsNotRun}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid Margin="0 0 0 15">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Classes="mediumText" Text="{Binding IdProgramTemplateNavigation.NameProgram}" Grid.Column="0" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- <Button Content="Редактировать" Command="{Binding $parent[UserControl].((vm:AllProgramsViewModel)DataContext).EditAndAddProgram}" CommandParameter="{Binding IdRunningPrograms}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|