<textbox grid.column="0" maxlength="1000" x:name="txtQuestionDesc" horizontalalignment="Stretch" textwrapping="Wrap" acceptsreturn="True" xmlns:x="#unknown"> Grid.Row="1" Margin="5,0,0,5" Height="100" Text="{Binding QuestionText, UpdateSourceTrigger=LostFocus}" > <textbox.style> <Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <Style.Resources> <visualbrush x:key="CueBannerBrush" alignmentx="Left" alignmenty="Center" stretch="None"> <visualbrush.visual> <Label Content="Question Description" Foreground="LightGray" HorizontalAlignment="Center" /> </visualbrush.visual> </visualbrush> </Style.Resources> <Style.Triggers> <trigger property="Text" value="{x:Static sys:String.Empty}"> <setter property="Background" value="{StaticResource CueBannerBrush}" /> </trigger> <trigger property="Text" value="{x:Null}"> <setter property="Background" value="{StaticResource CueBannerBrush}" /> </trigger> <trigger property="IsKeyboardFocused" value="True"> <setter property="Background" value="White" /> </trigger> </Style.Triggers> </Style> </textbox.style> </textbox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)