在c++, Windows Store Metro应用程序中设置控件的颜色
Set the color of a control in C++, Windows Store Metro App
我正在制作一个Windows Store Metro应用程序,我有一些问题…
我想在c++中设置控件的颜色,但是我不知道怎么做。
我现在有以下代码:
txt1->Background = ?
我有解决方案,首先创建一个画笔对象,设置颜色并将该颜色分配给控件背景。我使用了以下语句:
SolidColorBrush^ myBrush = ref new SolidColorBrush(Windows::UI::Colors::Red);
TextBox^ txtID = ref new TextBox();
txtID->Background = myBrush;
链接到我的问题:如何在windows 8商店应用程序中设置控件的背景色
相关文章:
- 如果我有五个 Win32 静态控件,如何使用特定的前景色设置其中一个?
- 如何在 C++ 中的 WebKitX ActiveX 控件中设置单击事件
- 如何在调整列表视图大小时将标题宽度设置为等于其列表视图控件宽度
- 无法将焦点设置为 CEdit 控件
- 十进制数字的区域设置感知编辑控件子类化(格式[sign][xxx..][decimal separator][yy.])
- 无法在编辑控件上设置字体
- C MFC设置/附加文本从Worker线程中从富裕的控件中进行
- mfc c++通过编辑控件设置另一个应用程序的HWND地址
- 如何设置 RTF 编辑控件的背景色
- Winapi设置活动选项卡控件
- 如何在Windows日历控件上设置字体
- 如何将文本从编辑控件设置为窗口
- MFC:如何在一个函数中捕获对话框的每个控件的设置焦点
- 如何在 MFC 的对话框中设置控件的初始位置?
- 在多字节字符集应用程序中的MFC窗体控件上设置Unicode文本
- MFC:在运行时设置控件的位置
- 在静态文本控件上设置图标
- 如何设置在运行时创建的Windows控件之间移动的顺序
- 在c++, Windows Store Metro应用程序中设置控件的颜色
- 在mfcc++中无法设置控件的背景颜色