|
|
|
@ -140,5 +140,99 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
@@ -140,5 +140,99 @@ namespace ICSharpCode.WpfDesign.Tests.XamlDom
|
|
|
|
|
</StackPanel> |
|
|
|
|
</Page>");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void Resources2() |
|
|
|
|
{ |
|
|
|
|
TestLoading(@"<UserControl
|
|
|
|
|
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
|
|
|
|
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
|
|
|
|
|
<FrameworkElement.Resources> |
|
|
|
|
<ResourceDictionary /> |
|
|
|
|
</FrameworkElement.Resources> |
|
|
|
|
</UserControl>");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void Animation1() |
|
|
|
|
{ |
|
|
|
|
TestLoading(@"<Window
|
|
|
|
|
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
|
|
|
|
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
|
|
|
|
|
<Canvas> |
|
|
|
|
<Button Width=""100"" Height=""100"" Canvas.Left=""8"" Canvas.Top=""8""> |
|
|
|
|
<Button.Triggers> |
|
|
|
|
<EventTrigger RoutedEvent=""Button.Loaded""> |
|
|
|
|
<BeginStoryboard> |
|
|
|
|
<Storyboard> |
|
|
|
|
<DoubleAnimation Duration=""0:0:10"" |
|
|
|
|
From=""1"" |
|
|
|
|
To=""0"" |
|
|
|
|
Storyboard.TargetProperty=""Opacity"" /> |
|
|
|
|
</Storyboard> |
|
|
|
|
</BeginStoryboard> |
|
|
|
|
</EventTrigger> |
|
|
|
|
</Button.Triggers> |
|
|
|
|
</Button> |
|
|
|
|
</Canvas> |
|
|
|
|
</Window>");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void Animation2() |
|
|
|
|
{ |
|
|
|
|
//Loaded Property has to be found, because this so also works in WPF
|
|
|
|
|
|
|
|
|
|
TestLoading(@"<Window
|
|
|
|
|
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
|
|
|
|
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
|
|
|
|
|
<Canvas> |
|
|
|
|
<Button Width=""100"" Height=""100"" Canvas.Left=""8"" Canvas.Top=""8""> |
|
|
|
|
<Button.Triggers> |
|
|
|
|
<EventTrigger RoutedEvent=""Loaded""> |
|
|
|
|
<BeginStoryboard> |
|
|
|
|
<Storyboard> |
|
|
|
|
<DoubleAnimation Duration=""0:0:10"" |
|
|
|
|
From=""1"" |
|
|
|
|
To=""0"" |
|
|
|
|
Storyboard.TargetProperty=""Opacity"" /> |
|
|
|
|
</Storyboard> |
|
|
|
|
</BeginStoryboard> |
|
|
|
|
</EventTrigger> |
|
|
|
|
</Button.Triggers> |
|
|
|
|
</Button> |
|
|
|
|
</Canvas> |
|
|
|
|
</Window>");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
|
public void Animation3() |
|
|
|
|
{ |
|
|
|
|
TestLoading(@"<Window
|
|
|
|
|
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
|
|
|
|
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">
|
|
|
|
|
<Canvas> |
|
|
|
|
<Button Width=""100"" Height=""100"" Canvas.Left=""8"" Canvas.Top=""8""> |
|
|
|
|
<Button.Triggers> |
|
|
|
|
<EventTrigger RoutedEvent=""Button.Loaded""> |
|
|
|
|
<BeginStoryboard> |
|
|
|
|
<BeginStoryboard.Storyboard> |
|
|
|
|
<Storyboard> |
|
|
|
|
<DoubleAnimation Duration=""0:0:10"" |
|
|
|
|
From=""1"" |
|
|
|
|
To=""0"" |
|
|
|
|
Storyboard.TargetProperty=""Opacity"" /> |
|
|
|
|
</Storyboard> |
|
|
|
|
</BeginStoryboard.Storyboard> |
|
|
|
|
</BeginStoryboard> |
|
|
|
|
</EventTrigger> |
|
|
|
|
</Button.Triggers> |
|
|
|
|
</Button> |
|
|
|
|
</Canvas> |
|
|
|
|
</Window>");
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|