//viusal state (hover or not) private void setImageState(bool isHover) { if (isHover) { this.Image.Source = ImageSourcer.GetHover(this.Type); } else { this.Image.Source = ImageSourcer.GetNormal(this.Type); } }
//set image acording to state and visual state private void setImageState(bool isHover) { string stateString = this.state ? "pause" : "play"; if (isHover) { this.Image.Source = ImageSourcer.GetHover(stateString); } else { this.Image.Source = ImageSourcer.GetNormal(stateString); } }