Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
3b4f8bba61 | |||
2db8be3335 | |||
69969701cd | |||
c4ca0272fd | |||
ed503fa8ad | |||
869854cf7d |
@ -7,4 +7,19 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\images\desert.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\images\forest.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\images\sea.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
<Resource Include="Resources\images\sea2.png">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -5,8 +5,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Interfaces"
|
||||
mc:Ignorable="d"
|
||||
Title="Images" Height="450" Width="800">
|
||||
<Grid ShowGridLines="True">
|
||||
Title="SoundBox" Height="450" Width="800">
|
||||
<Window.Resources>
|
||||
<SolidColorBrush x:Key="ForestBackgroundColor" Color="Olive" />
|
||||
<SolidColorBrush x:Key="DesertBackgroundColor" Color="LightSalmon" />
|
||||
<SolidColorBrush x:Key="SeaBackgroundColor" Color="DarkCyan" />
|
||||
</Window.Resources>
|
||||
<Grid ShowGridLines="True">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
@ -14,25 +19,28 @@
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch" Orientation="Vertical">
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image1</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image2</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image3</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image4</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image5</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image6</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image7</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Image8</Button>
|
||||
</StackPanel>
|
||||
<DockPanel Grid.Row="0" Grid.Column="1">
|
||||
<Border Background="LemonChiffon" BorderThickness="4,4,4,4"
|
||||
BorderBrush="Goldenrod">
|
||||
<ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch" Orientation="Vertical">
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonForest_Click">Forest</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonDesert_Click">Desert</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3" Click="ButtonSea_Click">Sea</Button>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<DockPanel Name="PanelMenu" Grid.Row="0" Grid.Column="1"
|
||||
Background="{StaticResource SeaBackgroundColor}">
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Execute</Button>
|
||||
<Button Margin="10,5,10,5" Padding="3,3,3,3">Cancel</Button>
|
||||
</StackPanel>
|
||||
<DockPanel Background="Black">
|
||||
<Image Source="C:\Users\user\source\repos\Interfaces_Zakharov_Rostislav\Interfaces\images/image2.png"/>
|
||||
<Viewbox>
|
||||
<Image Name="ImageNature" Source="/Resources/images/sea.png"/>
|
||||
</Viewbox>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
|
@ -1,17 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Interfaces
|
||||
{
|
||||
@ -24,5 +14,24 @@ namespace Interfaces
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ButtonDesert_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/desert.png", UriKind.Relative));
|
||||
PanelMenu.Background = (Brush)TryFindResource("DesertBackgroundColor");
|
||||
|
||||
}
|
||||
|
||||
private void ButtonForest_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/forest.png", UriKind.Relative));
|
||||
PanelMenu.Background = (Brush)TryFindResource("ForestBackgroundColor");
|
||||
}
|
||||
|
||||
private void ButtonSea_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ImageNature.Source = new BitmapImage(new Uri("/Resources/images/sea.png", UriKind.Relative));
|
||||
PanelMenu.Background = (Brush)TryFindResource("SeaBackgroundColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
Interfaces/Interfaces/Resources/images/desert.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/desert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1017 KiB |
Before Width: | Height: | Size: 880 KiB After Width: | Height: | Size: 880 KiB |
BIN
Interfaces/Interfaces/Resources/images/sea.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/sea.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 MiB |
BIN
Interfaces/Interfaces/Resources/images/sea2.png
Normal file
BIN
Interfaces/Interfaces/Resources/images/sea2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user