You can't add resources to a Window. But you can add resources like below depending on the scope you need those resources.
App project (App.xaml)
<Application
x:Class="WinUIDemoApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIDemoApp">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
<SolidColorBrush x:Key="AppProjectScopeBrush" Color="SkyBlue" />
</ResourceDictionary>
</Application.Resources>
</Application>
Page/Control
<Page
x:Class="WinUIDemoApp.SomePage"
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:local="using:WinUIDemoApp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
<Page.Resources>
<SolidColorBrush x:Key="SomePageScopeBrush" Color="SkyBlue" />
</Page.Resources>
<Grid RowDefinitions="Auto,*">
<StackPanel Grid.Row="0">
<Button Background="{StaticResource SomePageScopeBrush}" />
<!--
DOES NOT WORK: Can not find the ListViewScopeBrush.
<Button Background="{StaticResource ListViewScopeBrush}" />
-->
</StackPanel>
<ListView Grid.Row="1">
<ListView.Resources>
<SolidColorBrush x:Key="ListViewScopeBrush" Color="SkyBlue" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate>
<Button
Foreground="{StaticResource SomePageScopeBrush}"
Background="{StaticResource ListViewScopeBrush}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Page>