public ViewButtonsRibbonViewModel(IEventAggregator agg) { //initialises the prism events listener interface _aggregator = agg; //Intialises the Interfaces //ViewColours = new ChangeViewColours(); //ILinearGB = new ChangeGradient(); ViewColours = CreateInterface.ReturnTheChangeViewColoursProperty(); ILinearGB = CreateInterface.ReturnTheChangeGradientProperty(); //Intilaises the event listner _aggregator.GetEvent <UpdateColourEvent>().Subscribe(SetNewBackgroundColourNew); //assigns the mouse enter events to the prism delegate command obj mousenterCommand1 = new DelegateCommand <MouseEventArgs>(MouseEnterAction); //initialises the buttons Lineargb = ILinearGB.CreateLinearGradientFill(GradstopColour1, GradstopColour2); }
public ViewUtilityButtonsViewModel(IEventAggregator agg) { //intilaises the events aggregator service _aggregator = agg; //Intialises the mouse over command delegate that points to a method mousenterCommand2 = new DelegateCommand <MouseEventArgs>(MouseEnterAction); //intialises the interfaces //ViewColours = new ChangeViewColours(); //ILinearGB = new ChangeGradient(); ViewColours = CreateInterface.ReturnTheChangeViewColoursProperty(); ILinearGB = CreateInterface.ReturnTheChangeGradientProperty(); //Intialises the event listner for the event _aggregator.GetEvent <UpdateColourEvent>().Subscribe(SetNewBackgroundColour); //initialises the buttons Lineargb = ILinearGB.CreateLinearGradientFill(GradstopColour1, GradstopColour2); }
public ViewSearchTextBoxViewModel(IEventAggregator aggregator) { //Assigns the global events aggregator object _aggr = aggregator; //Assigns the command to the mouse enter event and passes the "MouseEventsArg" mousenterCommand3 = new DelegateCommand <MouseEventArgs>(MouseEnterAction); //Assigns the searchtextCommand to a delegate type points to a method //Observes the textsearch field. textsearchCommand = new DelegateCommand(CanExecute, Execute).ObservesProperty(() => textsearchCommand); //intialises the interfaces //ViewColours = new ChangeViewColours(); //ILinearGB = new ChangeGradient(); ViewColours = CreateInterface.ReturnTheChangeViewColoursProperty(); ILinearGB = CreateInterface.ReturnTheChangeGradientProperty(); //Intialises the event listner for the event _aggr.GetEvent <UpdateColourEvent>().Subscribe(SetNewBackgroundColourNew); //initialises the buttons Lineargb = ILinearGB.CreateLinearGradientFill(GradstopColour1, GradstopColour2); }
private void SetButtonGradientStyle(SolidColorBrush g1, SolidColorBrush g2) { //Sets the button gradient style Lineargb = ILinearGB.CreateLinearGradientFill(GradstopColour1, GradstopColour2); }