<Window x:Class="BuildInDialogs.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="174" Width="486">
	<Window.Background>
        <ImageBrush ViewportUnits="Absolute"   TileMode="Tile" Viewport="0,0,500,500">
            <ImageBrush.ImageSource>
                <BitmapImage UriSource="Images/background.png"/>
            </ImageBrush.ImageSource>
        </ImageBrush>
    </Window.Background>
	<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Name="stackPanel">
		<StackPanel.Resources>
			<Style x:Key="buttonStyle" TargetType="{x:Type Button}">
				<Setter Property="Background" Value="Red"/>
				<Setter Property="Opacity" Value="0.8"/>
				<Setter Property="RenderTransform">
					<Setter.Value>
						<TranslateTransform/>
					</Setter.Value>
				</Setter>
				<Style.Triggers>
					<!--animacja pomniejszająca przycisk zdefiniowana w wyzwalaczu EventTrigger-->
					<EventTrigger RoutedEvent="Button.MouseLeave">
						<EventTrigger.Actions>
							<BeginStoryboard>
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="RenderTransform.X"
To="-5" Duration="0:0:0.10"/>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger.Actions>
					</EventTrigger>
					<!--animacja powiększająca przycisk zdefiniowana w wyzwalaczu EventTrigger-->
					<EventTrigger RoutedEvent="Button.MouseEnter">
						<EventTrigger.Actions>
							<BeginStoryboard>
								<Storyboard>
									<DoubleAnimation Storyboard.TargetProperty="RenderTransform.X"
To="5" Duration="0:0:0.10"/>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger.Actions>
					</EventTrigger>
				</Style.Triggers>
			</Style>
		</StackPanel.Resources>
		<Button Style="{StaticResource buttonStyle}" Click="MessageBox_Click">Message Box</Button>
		<Button  Style="{StaticResource buttonStyle}" Click="OpenFile_Click">Open File</Button>
		<Button  Style="{StaticResource buttonStyle}" Click="SaveFile_Click">Save File</Button>
		<Button  Style="{StaticResource buttonStyle}" Click="Print_Click">Print</Button>
		<Button  Style="{StaticResource buttonStyle}" Click="CustomDialog_Click">Custom Dialog</Button>
	</StackPanel>
</Window>
