Пример #1
0
 private void changeSSImage()
 {
     Finder.FindVisualChildWithTag <Rectangle>(gameGrid, "SSImage").OpacityMask = new VisualBrush()
     {
         Visual = (Visual)ResourceDictionaryManager.GetResources()["appbar_door_enter"]
     };
 }
Пример #2
0
 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;
         }
     }
 }
Пример #3
0
        /// <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();
        }
Пример #4
0
 public void Initialise()
 {
     ResourceDictionaryManager.MergeDictionary(Assembly.GetExecutingAssembly().GetName().Name,
                                               "Module1Dictionary.xaml");
 }
Пример #5
0
        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));
        }