animation sample

main
syneffort 2 years ago
parent c81bfdf64e
commit 5ccf800134
  1. 14
      PacticeSolution/PacticeSolution.sln
  2. 2
      PacticeSolution/TreeViewSample/MainWindow.xaml
  3. 9
      PacticeSolution/TriggerAnimations/App.xaml
  4. 17
      PacticeSolution/TriggerAnimations/App.xaml.cs
  5. 10
      PacticeSolution/TriggerAnimations/AssemblyInfo.cs
  6. 39
      PacticeSolution/TriggerAnimations/MainWindow.xaml
  7. 28
      PacticeSolution/TriggerAnimations/MainWindow.xaml.cs
  8. 10
      PacticeSolution/TriggerAnimations/TriggerAnimations.csproj

@ -125,13 +125,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinqInNotIn", "LinqInNotIn\
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFrameworkSample", "EntityFrameworkSample\EntityFrameworkSample.csproj", "{AAEF47BF-A410-4A4D-942B-D9A1F4AA1343}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFrameworkSample", "EntityFrameworkSample\EntityFrameworkSample.csproj", "{AAEF47BF-A410-4A4D-942B-D9A1F4AA1343}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaPlayer", "MediaPlayer\MediaPlayer.csproj", "{0E7DB4A2-B598-452B-B1B4-CF36685D0D53}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaPlayer", "MediaPlayer\MediaPlayer.csproj", "{0E7DB4A2-B598-452B-B1B4-CF36685D0D53}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speech", "Speech\Speech.csproj", "{248DDC0C-F8C0-4687-BBC2-71C7C310537E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speech", "Speech\Speech.csproj", "{248DDC0C-F8C0-4687-BBC2-71C7C310537E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimerAndWorker", "TimerAndWorker\TimerAndWorker.csproj", "{6210631F-C8DF-45DC-B53E-3119E8BDFF9E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TimerAndWorker", "TimerAndWorker\TimerAndWorker.csproj", "{6210631F-C8DF-45DC-B53E-3119E8BDFF9E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeViewSample", "TreeViewSample\TreeViewSample.csproj", "{CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TreeViewSample", "TreeViewSample\TreeViewSample.csproj", "{CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriggerAnimations", "TriggerAnimations\TriggerAnimations.csproj", "{9D9FD436-C73C-4DB4-A311-09D2DB65E03E}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -399,6 +401,10 @@ Global
{CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Debug|Any CPU.Build.0 = Debug|Any CPU {CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Release|Any CPU.ActiveCfg = Release|Any CPU {CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Release|Any CPU.Build.0 = Release|Any CPU {CA88EE83-8C7F-4FEF-963A-DEACA5E502FB}.Release|Any CPU.Build.0 = Release|Any CPU
{9D9FD436-C73C-4DB4-A311-09D2DB65E03E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D9FD436-C73C-4DB4-A311-09D2DB65E03E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D9FD436-C73C-4DB4-A311-09D2DB65E03E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D9FD436-C73C-4DB4-A311-09D2DB65E03E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -60,7 +60,7 @@
</TreeViewItem> </TreeViewItem>
</TreeView> </TreeView>
<TreeView x:Name="trvStructure" Grid.Row="2" Margin="10" <TreeView x:Name="trvStructure" Grid.Row="2" Margin="10" %
TreeViewItem.Expanded="trvStructure_Expanded"/> TreeViewItem.Expanded="trvStructure_Expanded"/>
</Grid> </Grid>
</Window> </Window>

@ -0,0 +1,9 @@
<Application x:Class="TriggerAnimations.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TriggerAnimations"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace TriggerAnimations
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

@ -0,0 +1,39 @@
<Window x:Class="TriggerAnimations.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:local="clr-namespace:TriggerAnimations"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="200">
<Grid>
<Border Background="LightGreen" Width="100" Height="100" BorderBrush="Green">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Duration="0:0:0.400" To="3" Storyboard.TargetProperty="BorderThickness"/>
<DoubleAnimation Duration="0:0:0.300" To="125" Storyboard.TargetProperty="Height"/>
<DoubleAnimation Duration="0:0:0.300" To="125" Storyboard.TargetProperty="Width"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ThicknessAnimation Duration="0:0:0.400" To="0" Storyboard.TargetProperty="BorderThickness"/>
<DoubleAnimation Duration="0:0:0.300" To="100" Storyboard.TargetProperty="Height"/>
<DoubleAnimation Duration="0:0:0.300" To="100" Storyboard.TargetProperty="Width"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
</Grid>
</Window>

@ -0,0 +1,28 @@
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 TriggerAnimations
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>
Loading…
Cancel
Save