链接资源打破状态记录/更改 [英] Linked Resources breaking State recording/changes

查看:78
本文介绍了链接资源打破状态记录/更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置按钮的样式。我正在更改各种CommonStates(MouseOver,Pressed等)的背景属性。通过手动将画笔更改为我想要的任何颜色/画笔组合,它可以正常工作。一旦我尝试使用位于链接资源中的画笔替换特定状态下的一个背景
画笔,所有状态都将更改为此值。这应该是这样发生的吗?最终这些与几种不同的颜色相关联,我可以改变颜色资源
来玩不同的选项,但我无法使用链接资源。我是否能够为该状态唯一地"记录"对链接资源的引用?

I am trying to style a button. I am changing the background property on the various CommonStates (MouseOver, Pressed, etc.). It works fine by manually changing the brushes to whatever color/brush combo I want. As soon as I try to replace one of the background brushes in a particular state with a brush located in a linked resource, all states are changed to this one value. Is this supposed to happen this way? Ultimately these are linked to a couple different colors to where I can change just the color resources to play around with different options, but I can't get it to work with linked resources. Should I be able to 'record' references to linked resources uniquely for that one state?

示例:正常/基本状态,我想要链接资源'BrushDark'作为背景。 MouseOver状态我想要'BrushLight'链接资源。如果我将其中一个值更改为链接资源,则该资源现在存在于所有状态中,即使我在"正常"或"MouseOver"状态下进行了更改

Example: Normal/Base state, I want linked resource 'BrushDark' for background. MouseOver state I want 'BrushLight' linked resource. If I change one of the values to a linked resource, that resource is now present in all states, even though I made the change in the 'Normal' or 'MouseOver' state.

推荐答案

只是一个想法,但你在混合颜色和画笔吗?这可能是因为它重置了基本属性而不是在状态中记录它。
Just a thought, but are you mixing colors and brushes? That might account for it resetting the base property instead of recording it in the state.


这篇关于链接资源打破状态记录/更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆