private void SetNewBackgroundColour(string thetag) { //Extracts the solidcolourbrushs from the dictionary and applies them to the style //<---------This method will be obselete see 'SetNewBackgroundColourNew'-------> //Assigns a dictionary object Dictionary <string, SolidColorBrush> Menustyles = ViewColours.ColourDictionaryChangeEntry(thetag); //Checks to see if the dictionary object is empty - move this to the class! if (Menustyles.Count == 0) { _eventaggregator.GetEvent <UpdateTagEvent>().Publish("ERROR - The Property was not set in the View!"); } else { MenuBorderBackGround = Menustyles.SingleOrDefault(x => x.Key == "_MenuBorderBackGround").Value; MenuItemsForeground = Menustyles.SingleOrDefault(x => x.Key == "_MenuItemsForeground").Value; MenuItemsBorderBrush = Menustyles.SingleOrDefault(x => x.Key == "_MenuItemsBorderBrush").Value; MenuHighlightForeground = Menustyles.SingleOrDefault(x => x.Key == "_MenuHighlightForeground").Value; } //Publishes to the update colour event pub/sub //passing the tag for the events listner _eventaggregator.GetEvent <UpdateColourEvent>().Publish(thetag); }
private void SetNewBackgroundColour(string thetag) { //Extracts the solidcolourbrushs from the dictionary and applies them to the style //Assigns a dictionary object Dictionary <string, SolidColorBrush> Buttonstyles = ViewColours.ColourDictionaryChangeEntry(thetag); //Checks to see if the dictionary object is empty - move this to the class! if (Buttonstyles.Count == 0) { _aggr.GetEvent <UpdateTagEvent>().Publish("ERROR - The Property was not set in the View!"); } else { EllipseStroke = Buttonstyles.SingleOrDefault(x => x.Key == "_EllipseStroke").Value; ButtonMouseOverForeground = Buttonstyles.SingleOrDefault(x => x.Key == "_ButtonMouseOverForeground").Value; ButtonIsPressStroke = Buttonstyles.SingleOrDefault(x => x.Key == "_ButtonIsPressStroke").Value; TextBoxBorderBrush = Buttonstyles.SingleOrDefault(x => x.Key == "_TextBoxBorderBrush").Value; TextBoxBorderBackground = Buttonstyles.SingleOrDefault(x => x.Key == "_TextBoxBorderBackground").Value; GradstopColour1 = Buttonstyles.SingleOrDefault(x => x.Key == "_EllipseGradientStopColour1").Value; GradstopColour2 = Buttonstyles.SingleOrDefault(x => x.Key == "_EllipseGradientStopColour2").Value; } //Moves to the Method to set the gradient style of the button SetButtonGradientStyle(GradstopColour1, GradstopColour2); }
private void SetNewBackgroundColour(string thetag) { //Extracts the solidcolourbrushs from the dictionary and applies them to the style //Assigns a dictionary object Dictionary <string, SolidColorBrush> Windowstyles = ViewColours.ColourDictionaryChangeEntry(thetag); //Checks to see if the dictionary object is empty - move this to the class! if (Windowstyles.Count == 0) { _aggregator.GetEvent <UpdateTagEvent>().Publish("ERROR - The Property was not set in the View!"); } else { MainWindowBorderBrush = Windowstyles.SingleOrDefault(x => x.Key == "_MainWindowBorderBrush").Value; MainWindowBorderBackground = Windowstyles.SingleOrDefault(x => x.Key == "_MainWindowBorderBackground").Value; } }