-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
regressionWhat was working is now brokeWhat was working is now broke
Description
Describe the bug
I copied sample code from BlurEffectAnimation to my project.Then it throw a NullReferenceException when i run my winui3 application.

Steps to reproduce
Copy sample code to MainWindow.xaml and run application
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="BlurTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BlurTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:media="using:CommunityToolkit.WinUI.Media">
<Grid>
<Border Height="280">
<Image VerticalAlignment="Center"
Source="ms-appx:///Assets/StoreLogo.png" />
<media:UIElementExtensions.VisualFactory>
<media:PipelineVisualFactory>
<media:BlurEffect x:Name="ImageBlurEffect"
IsAnimatable="True" />
</media:PipelineVisualFactory>
</media:UIElementExtensions.VisualFactory>
<ani:Explicit.Animations>
<ani:AnimationSet x:Name="BlurAnimation"
IsSequential="True">
<ani:BlurEffectAnimation EasingMode="EaseOut"
EasingType="Linear"
Target="{x:Bind ImageBlurEffect}"
From="0"
To="8"
Duration="0:0:3" />
<ani:BlurEffectAnimation EasingMode="EaseOut"
EasingType="Linear"
Target="{x:Bind ImageBlurEffect}"
From="8"
To="0"
Duration="0:0:3" />
</ani:AnimationSet>
</ani:Explicit.Animations>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Loaded">
<behaviors:StartAnimationAction Animation="{x:Bind BlurAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Border>
</Grid>
</Window>
### Expected behavior
MainWindow play blur animation after start.
### Screenshots




### Code Platform
- [ ] UWP
- [X] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
### Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [X] Windows 10 22H2 (Build 19045)
- [ ] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
### Other Windows Build number
_No response_
### App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [X] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [ ] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)
### Other SDK version
_No response_
### Visual Studio Version
2022
### Visual Studio Build Number
_No response_
### Device form factor
Desktop
### Additional context
_No response_
### Help us help you
Yes, I'd like to be assigned to work on this item.
Metadata
Metadata
Assignees
Labels
regressionWhat was working is now brokeWhat was working is now broke
Type
Projects
Status
✅ Done