Change text Colour in a mashup

Sort:
You are not authorized to post a reply.
Author
Messages
Darchy
New Member
Posts: 3
New Member
    Hey Guys,

    Is there any way to change the text colour in a mashup via the Code

    Eg:
    Grid.Row="0" Grid.Column="1" Name="MMS240MIPanel" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Left">
          
             
                SourceName="ItemMaster" SourceEventName="CurrentItemChanged" TargetEventName="FillForm">
                   TargetKey="SERN" Value="ENTER SERIAL" />


    I would like the text "ENTER SERIAL" to be in Red

    Any help would be fantastic.

    Cheers

    Jeff
    Karin
    Veteran Member
    Posts: 57
    Veteran Member
      Hi Jeff,
      In your mashup I'm assuming that there is a TextBox that the user should use to enter the serial, and here you want the text to be ENTER SERIAL.
      You can look for it for searching for SERN. Now add a Name to the TextBox, eg:
       


      Now using the technique found in the Property Setter example from within the Designer -> Help ->Common ->Property Setter set the Foreground property to Red. It's a way to set any property in a Mashup event.

      
      ....your first event here.....
      	
      								
      							
      	 


      Now the text will remain red until you change it in another event. Perhaps you can change it back after UpdateCompleted if the event is an update transaction?

      I hope this will work. The property is a Color object so it migth not work but setting Foreground to Red directly does work so it's worth a try. I don't have access to an environment so let me know if it works.
      Regards Karin http://smartofficeblog.com
      Darchy
      New Member
      Posts: 3
      New Member
        Thank you so much Karin, I will give this a try in the Morning and post the results.

        Cheers

        Jeff
        Darchy
        New Member
        Posts: 1
        New Member
          Hey Karin

          Apologies, I had forgotten all about this.

          Yes, It worked!

          Better late than never.

          Cheers

          Jeff
          ScottCT
          Advanced Member
          Posts: 24
          Advanced Member
            Hello,
            this is an older post but I'd thought I'd throw in a different solution.
            Rather than relying on a mashup:SetProperty event, try using a textBox style:

            
             
            	 
            	 	
             	
            
            


            So for this style, anytime the Text is "ENTER SERIAL" the foreground color will be Red. Also, have set the binding on the text to have a FallbackValue. What this will do is the text will fall back to "ENTER SERIAL" if no input has been entered.

            You are not authorized to post a reply.