我如何将点击事件的形状颜色更改为我的资源颜色?
public void BtnBlue_Click(object sender, RoutedEventArgs e)
{
RectangleSolid.
}
<SolidColorBrush x:Key="SolidBlue" Color="Blue" />
答案 0 :(得分:0)
RectangleSolid.Fill = (Brush)myWindow.TryFindResource("SolidBlue");
答案 1 :(得分:0)
如果定义query.select(root)
.where(builder.and(builder.equal(root.get("flat").get("house"), house),
builder.greaterThanOrEqualTo(root.get("date"), monthStart),
builder.lessThanOrEqualTo(root.get("date"), monthEnd)));
的{{1}}在范围内,这将有效:
ResourceDictionary
您可以在SolidBlue
文件中定义资源:
RectangleSolid.Fill = (Brush)TryFindResource("SolidBlue");