我创建了一个基本的 UWP 应用程序,当我尝试像这样使用亚克力画笔时:
<Page
x:Class="LearningUWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:LearningUWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
// Acrylic brush here
<Page.Resources>
<media:AcrylicBrush x:Key="HostBackdropBrush"
BackgroundSource="HostBackdrop"
TintColor="LightBlue"
TintOpacity="0.6"
FallbackColor="LightSkyBlue"
FallbackForced="False" />
</Page.Resources>
<Grid>
<Button Content="Synthesize" Margin="528,88,0,0" VerticalAlignment="Top" Height="93" Width="222" Click="Button_Click"/>
<TextBox x:Name="Text" HorizontalAlignment="Left" Height="145" Margin="39,62,0,0" Text="Hello, World!" TextWrapping="Wrap" VerticalAlignment="Top" Width="389"/>
</Grid>
</Page>
Visual Studio 这么说Acrylic Brush is not supported in UWP
。我是 Windows 10 1903(这也是我的目标版本),我的最低版本是 1803。