Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用C#代码在UWP应用程序中创建动态背景?(15063)_C#_.net_Xaml_Uwp - Fatal编程技术网

如何使用C#代码在UWP应用程序中创建动态背景?(15063)

如何使用C#代码在UWP应用程序中创建动态背景?(15063),c#,.net,xaml,uwp,C#,.net,Xaml,Uwp,我们都知道,在Web开发中,可以使用JavaScript和Canvas标记创建具有动态背景的HTML5页面 例如: 我想知道如何在UWP应用程序中使用C#代码来实现类似的结果 由于以下代码: <Page x:Class="App.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/

我们都知道,在Web开发中,可以使用JavaScript和Canvas标记创建具有动态背景的HTML5页面

例如:

我想知道如何在UWP应用程序中使用C#代码来实现类似的结果

由于以下代码:

<Page
    x:Class="App.MainPage"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid Background="Red">
        <Grid></Grid>
    </Grid>
</Page>

这个纯色背景太单调了。

看看。它提供了一个GPU加速的XAML画布控件,用于渲染由数千个多边形组成的2D场景。此画布控件可以用作页面的背景。该库支持自定义像素着色器。您可以依赖内置的图形效果,也可以创建自己的效果。这是我的建议