Categories > Exploiting > Tutorials >

[Sh*t Src] XAML TextBox w/ Placeholder

TERIHAX

i say im gay as a joke 🙀

Posts: 2239

Threads: 102

Joined: Jul, 2020

Reputation: 32

Posted

<Style x:Key="PlaceholderTextBox" TargetType="{x:Type TextBox}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type TextBox}">
                <Border x:Name="Back" BorderBrush="{TemplateBinding BorderBrush}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Grid>
                        <ScrollViewer x:Name="PART_ContentHost" Width="{TemplateBinding Width}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False"/>
                        <TextBlock x:Name="Placeholder" Visibility="Collapsed" Panel.ZIndex="-1" Text="{TemplateBinding Tag}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="Gray" TextAlignment="Center"/>
                    </Grid>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="Text" Value="">
                        <Setter TargetName="Placeholder" Property="Visibility" Value="Visible"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

 

so um xaml textbox with a placeholder add your animatiosn whatever tf u want uh and this code is sh*t ik but whatever

 

so uh to use this:

<TextBox Tag="Search" Text="" VerticalAlignment="Top" Width="453" Style="{DynamicResource RoundedTextBox}" Background="#FF212121" Height="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" TextAlignment="Center" FontSize="14"/>

 

put your placeholder in the "Tag" property

  • 0

Posts: 1430

Threads: 71

Joined: May, 2022

Reputation: 20

Replied

cool release, i never found a package or library that works this easily

 

edit: why is this in the html section lmao

Comments

TERIHAX 32 Reputation

Commented

uh there is no xaml/xml or wpf category and this cant be in C# bc this is xaml

  • 0

  • 0

i use arch btw

Posts: 1138

Threads: 84

Joined: Apr, 2020

Reputation: 34

Replied

What is this? Is it supposed to be some kind of hint inside the textbox?

Comments

TERIHAX 32 Reputation

Commented

yk like when you clear the text of the textbox, theres a text in the background that shows up, it could be smth like "Search" or something

  • 1

  • 0

modifying a ui and calling it yours does mean it's your ui.

- JalapenoGuy

https://media.discordapp.net/attachments/769992459916017687/1065084754128539658/image0.jpg

RiceUsesArchBtw

rice cracker

vip

Posts: 465

Threads: 19

Joined: Aug, 2021

Reputation: 39

Replied

just create an extended text box control with placeholder property smh 

Comments

TERIHAX 32 Reputation

Commented

ok bro heres a gun👳🏿‍♂ you can shoot me

 

also i dont understand wym

  • 0

RiceUsesArchBtw 39 Reputation

Commented

ill explain in dms

  • 1

  • 0

https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )