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 add image from folder 
Html :: how to escape in html 
Html :: definition list in html 
Html :: refused to connect iframe php 
Html :: how to add text in html 
Html :: html email link 
Html :: h4 in html 
Html :: java replace all html tags 
Html :: disable first option in select 
Html :: append button in div 
Html :: breaks html 
Html :: change icon title react 
Html :: change font size of h1 in html 
Html :: how to create an html button that acts like a link 
Html :: git stash pop name 
Html :: multiple forms in the same line html 
Html :: how to add css file in wordpress 
Html :: discord widget html code 
Html :: target vs currenttarget 
Html :: google share link html 
Html :: font awesome icons html 
Html :: smooth scroll button by element id 
Html :: what does html mean 
Html :: what is rc in version 
Html :: how to call a script from another script in javascript 
Html :: how to add text box html 
Html :: back arrow html 
Html :: bootstrap 5 font color 
Html :: how to install font-aweseome usin npm 
Html :: creating a table in html 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =