Search
 
SCRIPT & CODE EXAMPLE
 

HTML

placeholder wpf

<TextBox
                        x:Name="tbxSeach"
                        Grid.Row="0"
                        Grid.Column="0"
                        Height="25"
                        Margin="10,0,10,0"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Bottom"
                        VerticalContentAlignment="Center"
                        Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                        TextAlignment="Left">
                        <TextBox.Resources>
                            <VisualBrush
                                x:Key="hinttext"
                                AlignmentX="Left"
                                Stretch="None"
                                TileMode="None">
                                <VisualBrush.Visual>
                                    <TextBlock
                                        FontStyle="Italic"
                                        Foreground="#959595"
                                        Text="Search..." />
                                </VisualBrush.Visual>
                            </VisualBrush>
                        </TextBox.Resources>
                        <TextBox.Style>
                            <Style BasedOn="{StaticResource TextBoxBase}" TargetType="TextBox">
                                <Setter Property="VerticalAlignment" Value="Center" />
                                <Setter Property="FontSize" Value="12" />
                                <Setter Property="Background" Value="Transparent" />
                                <Style.Triggers>
                                    <Trigger Property="Text" Value="">
                                        <Setter Property="Background" Value="{StaticResource hinttext}" />
                                    </Trigger>

                                    <Trigger Property="Text" Value="{x:Null}">
                                        <Setter Property="Background" Value="{StaticResource hinttext}" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </TextBox.Style>
                    </TextBox>
Comment

placeholder textbox wpf

 <Grid Background="White" HorizontalAlignment="Right" VerticalAlignment="Top"  >
        <!-- overlay with hint text -->
        <TextBlock Margin="5,2" MinWidth="50" Text="Suche..." 
                   Foreground="LightSteelBlue" Visibility="{Binding ElementName=txtSearchBox, Path=Text.IsEmpty, Converter={StaticResource MyBoolToVisibilityConverter}}" IsHitTestVisible="False"/>
        <!-- enter term here -->
        <TextBox MinWidth="50" Name="txtSearchBox" Background="Transparent" />
    </Grid>
Comment

PREVIOUS NEXT
Code Example
Html :: html to hml 
Html :: html image with link 
Html :: bootstrap table dense 
Html :: bootstrap.. 
Html :: website code example for html 
Html :: ignore text html elemnt 
Html :: input type for contact no 
Html :: go to id html 
Html :: tailwind css navbar 
Html :: how to set logo on site tab 
Html :: how to get number list in html 
Html :: city of hamilton 
Html :: on this image error 
Html :: bootstrap checkbox inline 
Html :: html5 
Html :: how to change the height of an image in html 
Html :: html video 
Html :: firefox image/svg+xml not working 
Html :: html boilerplate code 
Html :: is html easy? 
Html :: plantuml font size 
Html :: play audio source on html 
Html :: html lien téléphone 
Html :: html putting content in input 
Html :: bootstrap 4 form input group 
Html :: form example 
Html :: aria-label 
Html :: set text of file input 
Html :: captcha code 
Html :: Adding a button to a Markdown 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =