Wpf Text Box , Is set to mandatory and need to change border color .
Hi,
In wpf application . We a text box as mandatory and set the border color as red . We need to change the color to black when user enter values .
How to do that in xaml page .
Thank YOu
Hi Jeevan,
you could use a Style with a trigger for that.
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="TextBox" x:Key="TextBoxMandatoryStyle">
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="BorderBrush" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Grid.Row="0" Style="{StaticResource TextBoxMandatoryStyle}"/>
<TextBox Grid.Row="1" Style="{StaticResource TextBoxMandatoryStyle}"/>
<TextBox Grid.Row="2" />
</Grid>
</Window>
Thomas Claudius Huber
"If you can't make your app run faster, make it at least look & feel extremly fast"
My latest Pluralsight-courses:
XAML Layout in Depth
Windows Store Apps - Data Binding in Depth
twitter: @thomasclaudiush
homepage: www.thomasclaudiushuber.com
Similar Messages
-
I have a logo from another source and need to change the colors of it, HOW?
I had an outside source build me a logo which I want to use for my product labels etc. but I'm having trouble figuring out how to format a template for the correct size to transfer to the labels and I cant figure out how to change the color/colors of the logo that I was given?
Andy,
The trial works just as the paid one, same version, only time limited.
If you open the AI version, what happens when you Alt/OptionClick (hold Alt if on Windows, Option if on Mac when clcking) one of the areas you wish to colour change?
If we are lucky, that will select the area, and you may change the colour (if you have selected the Fill box rather than the Stroke box at the bottom of the Toolbox); you may set the CMYK or RGB values in Window>Color (choose the relevant one from the flyout), or from the Window>Swatches, or in a few other ways. -
Somehow my MacBook (vintage) is now showing a black text box that continues to type and also speak what I am doing. There is also a blk border text box that follow me in the page itself. How do I get this turned off?
What version of Mac OS X? Do you have the original (or any) system disk?
-
I am creating a web form from a template and I need to change a field. It is just a text field at the moment but I need to change it to a field that the customer can fill in. How do I do this?
See this thread:
http://answers.acrobatusers.com/Is-add-instructional-text-text-field-disappear-clicked-q19 5078.aspx -
the ringer of my iphone 4s is not working but when itried to go in setting then sound and tried to change ringtone the ringer is working..pls help
Check the mute switch along the side, near the external volume controls.
-
I uninstalled Adobe Flash and then tried to download it. I get a message from Adobe saying "Failed to Initialize" Is there a setting on Mozilla I need to change to allow the plug in?
Why are you not using Firefox 7?
* getfirefox.com -
Apple TV only showing trying to change date and time. I have recently changed to a new wifi provider and need to change the settings in tha ATV box.
Welcome to the Apple Community.
Assuming this is not the first time you have used your Apple TV
You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
Also try restarting the router. (Also try removing it’s power cord for at least 30 seconds)
If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123. -
I recently changed my email address and need to change my icloud account on both my itunes and iphone. How do I do this without completely wiping the phone.
Also I tried to update to iOS6 and it is asking for my password under my old signin and locked me out of my phone.
What can I do?
ThanksThis explains how to change your ID: http://support.apple.com/kb/HT5621. After changing your ID you will need to go to Settings>iCloud, delete the existing account (which only deletes it from your device, not from iCloud), then sign back in with the new ID. To avoid losing photo stream photos, save them to your camera roll before deleting the existing account.
If you are signed into your account on your Mac, you will need to go to System Preferences>iCloud, sign out, then sign back in with the new ID. -
I lost my iPad and need to change my apple ID.
Hi Everyone
Please help before I hit my new mac with a sledge hammer!!
I recently lost my ipad and need to change my apple ID. When I go to the ID page it gives me the option of changing any of my details except my ID which does not have an edit button next to it. How can I change the ID itself and would I lose access to my existing apps if I did change it? I have spent hours signing out of every feature on both my mac and iphone but how can i do this from my now lost ipad and would it make any difference if i could? I am very confused and frustrated with all the apple jargon on the help pages and support communities. Please can somebody help by talking english to me??Why do you want to change the ID? If it's because you've lost your iPad just change the password so that the person now in posession of it can't get into your iCloud account.
If you really want to change the address which forms the ID you can do this at http://appleid.apple.com provided that it isn't an @icloud.com, @me.com or @mac.com address - if it's one of those that would explain why you don't have an 'edit' button and you can't change it.
It you were able to change the ID that won't affect your access to apps since the account itself remains the same, though of course the login has to be changed on every device signed into iCloud or iTunes.
If you are going to change either the ID or the password you must turn of 'Find My iPhone' on any device it is enabled on or you will find yourself in difficulties. -
hello. So I have used my iPod touch 4g for 2 years now and need to change the battery. My question is: will I lose everything I have on my iPod like my music,pictures and apps if I change the battery on my iPod touch 4g?
Thanks for answerIf you go to Apple, they will not replace your battery, but exchange your iPod for a refurbished iPod of the same model with a new battery. Therefore you will lose everything that is not backed up. If you change it yourself or have a third party change it, you will most likely not lose anything (but still best to make a backup as lllaass suggested).
-
Bought an iPad mini with AppleCare registered in my name and need to change it to my wife's name - how?
Apple's customer support can certainly do that, but it is not necessary. AppleCare follows the product, not its owner.
If you want to contact Apple use the Contact Us link at the bottom of this page. -
I have thousands of pdf and need to change an image that is the same at all.
Hi,
I have thousands of pdf and need to change one image that is the same at all.
Is it possible to do this automatically?
Thanks.The image is the same size, but not in the same position
Thanks -
Hello experts ;
I have a question in relation with Meter Asset Management :
If the device category is wrong and need to change it to the right one. How to correct it ?
Many thanks !Hi,
Dont know much about IS-U, but there is a different forum for IS- utility, you can post your query there to get quick response.
SAP for Utilities
Regards,
sitanshu -
What about the verification questions? the ones like "way was your first job?" or "your favorite teacher?" I just got a new iPod and forgot the answers to those questions, and need to change them.. not sure how, but I need to do that in order to download new stuff on my new ipod
Funds cannot be transferred from one Apple ID account to another.
Try here > Rescue email address and how to reset Apple ID security questions
If that doesn't help, contact Apple for assistance with your security questions > Contacting Apple for support and service -
I have moved from south africa to the US and need to change all my billing details - I'm unable to change the country of residence part?
Did you click the "change country or region" link in your account information in the iTunes Store? If not, you need to do that to change your country. Note that you will need a valid US credit card or US iTunes card to enter as payment method.
Regards.
Maybe you are looking for
-
Error when activating DSO data
On activation, I see the following error in ST22: Invalid column name 'TCTIVAL60' Any idea? Thanks in advance!
-
Teradata deski #Multivalue Error
When refreshing the XIR2+Sp2 deski report with freehand sql data provider with Teradata V2r6 getting #Multivalue error and when editing dataprovider report displays data with out any errors. Please Assists
-
How to get full screen as a default?
My display screen is half size. Each time I log on I have to go to view and then to presentation view to view full screen. Is there a way for it to default to full screen?
-
Record audio from microphone in .swf
Hello i need to record audio with help of microphone, can any 1 tell me how it is possible and what is the possible way to do this. I am having flash 8 and flash communication(media) server 2.0 Please let me know which are the possible ways to this t
-
Hi there, having successfully overcome installation problems (the update to 1.0.1 would not install) I now have connected a second display. Result: Aperture crashes each time I want to start it. "Try again" yields the same result, o I clicked the but