-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
bugSomething isn't workingSomething isn't workingcomponents::mediaCreate animated Media effects on UI elementsCreate animated Media effects on UI elements
Milestone
Description
Describe the bug
Getting null reference exception on a WinUI application when using UIElementExtensions.VisualFactory
Regression
No response
Reproducible in sample app?
- This bug can be reproduced in the sample app.
Steps to reproduce
Stack trace:
_at CommunityToolkit.WinUI.Media.Pipelines.PipelineBuilder.<BuildAsync>d__9.MoveNext()
at CommunityToolkit.WinUI.Media.PipelineVisualFactoryBase.<GetAttachedVisualAsync>d__0.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at CommunityToolkit.WinUI.Media.PipelineVisualFactory.<GetAttachedVisualAsync>d__8.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at CommunityToolkit.WinUI.Media.UIElementExtensions.<OnVisualFactoryPropertyChanged>d__3.MoveNext()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()_
use the following xaml:
<Grid>
<Grid>
<Viewbox Margin="10">
<Grid>
<Path Data="F0M6.69808,19.74842 ...14.82079,16.64823 z"
Fill="#FF409CC5"
Stretch="None" />
</Grid>
</Viewbox>
</Grid>
</Grid>
<Border Grid.RowSpan="2">
<media:UIElementExtensions.VisualFactory>
<media:PipelineVisualFactory Source="{media:BackdropSource}">
<media:LuminanceToAlphaEffect />
<media:OpacityEffect Value="0.4" />
<media:BlendEffect Mode="Multiply" Source="{media:BackdropSource}" />
<media:BlurEffect Amount="16" />
<media:ShadeEffect Intensity="0.2" Color="#FF222222" />
</media:PipelineVisualFactory>
</media:UIElementExtensions.VisualFactory>
</Border>
the project references:
CommunityToolkit.Mvvm 8.2.1
CommunityToolkit.WinUI.Behaviors 8.0.230907
CommunityToolkit.WinUI.Media 8.0.230907
CommunityToolkit.WinUI.UI.Controls 7.1.2
Microsoft.Extensions.Hosting 6.0.1
Microsoft.WindowsAppSDK 1.3.230502000
Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
System.Configuration.ConfigurationManager 7.0.0
WinUIEx 2.2
Expected behavior
no nre
Screenshots
No response
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 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)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Nuget packages
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomponents::mediaCreate animated Media effects on UI elementsCreate animated Media effects on UI elements
Type
Projects
Status
👀 In review