private void changeSSImage() { Finder.FindVisualChildWithTag <Rectangle>(gameGrid, "SSImage").OpacityMask = new VisualBrush() { Visual = (Visual)ResourceDictionaryManager.GetResources()["appbar_door_enter"] }; }
private void changeSSImage() { foreach (Rectangle r in Finder.FindVisualChildren <Rectangle>(gameGrid)) { if (r.Tag?.ToString() == "SSImage") { r.OpacityMask = new VisualBrush() { Visual = (Visual)ResourceDictionaryManager.GetResources()["appbar_door_enter"] }; break; } } }
/// <summary> Starts the game when the button is clicked. </summary> private void startGame(object sender, RoutedEventArgs e) { ScoreInterface.Instance.StartTimeControler(); Finder.FindVisualChildren <Rectangle>(sender as Button).First().OpacityMask = new VisualBrush() { Visual = (Visual)ResourceDictionaryManager.GetResources()["appbar_navigate_next"] }; setUserControlsEnabled(true); nextRowButton.Click -= startGame; nextRowButton.Click += nextRow; nextRowButton.IsEnabled = false; mainDisp.SetActiveRowVisual(); }
public void Initialise() { ResourceDictionaryManager.MergeDictionary(Assembly.GetExecutingAssembly().GetName().Name, "Module1Dictionary.xaml"); }
internal virtual object ReadValueFromStyle(DependencyProperty dp) { var style = this.styleCache ?? ResourceDictionaryManager.GetResourceFromLogicalTree(this, this.GetType()) as Style; return(style == null ? DependencyProperty.UnsetValue : style.FindValue(dp)); }