visual studio 2013中windows 8.1(平板电脑)的C#颜色编码

visual studio 2013中windows 8.1(平板电脑)的C#颜色编码,c#,windows-8.1,C#,Windows 8.1,我可以知道我应该如何编写 网格背景/文本块前景 在visual studio 2013中?(适用于Windows 8.1平板电脑(Surfaceert))适用于ex if(something == true) { grid.Background = new SolidColorBurush(Windows.UI.Colors.Red); } 你可以试试这些选项 if(Contition == true) { // you can try this grid.Backgro

我可以知道我应该如何编写

网格背景/文本块前景

在visual studio 2013中?(适用于Windows 8.1平板电脑(Surfaceert))

适用于ex

if(something == true)
{
   grid.Background = new SolidColorBurush(Windows.UI.Colors.Red);
}

你可以试试这些选项

if(Contition == true)
{
    // you can try this
    grid.Background = new SolidColorBurush(Colors.Green);

    // you can try this too
    grid.Background =  new SolidColorBrush(Color.FromArgb(255, 0, 255, 0);    
}
如果出现颜色或颜色不存在的错误,或者缺少某些程序集。 所以,只需右键单击“颜色/颜色”,然后选择“解析”选项。全部完成:)


希望这有帮助:)

你能详细描述一下你的任务吗?@ad1Dima我想更改设置a的颜色(红色),如果(something=true),网格/文本块应该改为绿色。你尝试了什么?给我们一些你想要实现的更多信息!在中找不到颜色vs2013@Hathaway将NamePase Windows.UI添加到usings。或者你可以添加Windows.UI.ColorsThanks人物!它起作用了!
if(Contition == true)
{
    // you can try this
    grid.Background = new SolidColorBurush(Colors.Green);

    // you can try this too
    grid.Background =  new SolidColorBrush(Color.FromArgb(255, 0, 255, 0);    
}