Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/303.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# 设置按钮';windows应用商店应用程序中的背景_C#_Visual Studio 2013_Windows 8.1 - Fatal编程技术网

C# 设置按钮';windows应用商店应用程序中的背景

C# 设置按钮';windows应用商店应用程序中的背景,c#,visual-studio-2013,windows-8.1,C#,Visual Studio 2013,Windows 8.1,我希望有人能帮我解决这个问题,因为我不熟悉C#编程语言。 我一直很难用C语言将图像插入按钮。通过依赖XAMl表示,我已经取得了成功,但我需要知道如何使用C语言完成这项任务 非常感谢您的帮助。试试这个XAML <Grid> <Button Height="100" Width="100"> <Button.Template> <ControlTemplate>

我希望有人能帮我解决这个问题,因为我不熟悉C#编程语言。 我一直很难用C语言将图像插入按钮。通过依赖XAMl表示,我已经取得了成功,但我需要知道如何使用C语言完成这项任务

非常感谢您的帮助。

试试这个XAML

  <Grid>
        <Button Height="100" Width="100">
            <Button.Template>
                <ControlTemplate>
                    <Image Source="imgpath.png"/>
                </ControlTemplate>
            </Button.Template>
        </Button>

    </Grid>

来源:

您尝试过什么?您能提供一个代码不起作用的示例吗?亲爱的Zach。。。非常感谢您,我也非常感谢您的帮助,但是您能帮我找到一个使用C#而不是XAML的解决方案吗?因为我已经找到了方法。