optimize<*>: use custom view locator instead of ContentControl.DataTemplates to avoid memory leak.

This commit is contained in:
leo 2024-03-02 22:45:14 +08:00
parent 27d4dd5f64
commit 60e664ab26
9 changed files with 77 additions and 62 deletions

View file

@ -223,8 +223,8 @@
</Border>
</Grid>
<!-- Page container -->
<ContentControl Grid.Row="1" Background="{DynamicResource Brush.ToolBar}" Content="{Binding ActivePage.View}"/>
<!-- Page body -->
<v:LauncherBody Grid.Row="1" Background="{DynamicResource Brush.ToolBar}" Data="{Binding ActivePage.Data}"/>
<!-- Popup container -->
<Grid Grid.Row="1" x:Name="popupContainer" Margin="0,36,0,0" ClipToBounds="True" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}">