Categories > Exploiting > Tutorials >
[Sh*t Src] XAML TextBox w/ Placeholder
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
Cancel
Post
Replied
cool release, i never found a package or library that works this easily
edit: why is this in the html section lmao
Cancel
Post
Did I mention I use arch btw?
Replied
What is this? Is it supposed to be some kind of hint inside the textbox?
Comments
TERIHAX 30 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
Cancel
Post
modifying a ui and calling it yours does mean it's your ui.
- JalapenoGuy
https://media.discordapp.net/attachments/769992459916017687/1065084754128539658/image0.jpg
Replied
just create an extended text box control with placeholder property smh
Comments
TERIHAX 30 Reputation
Commented
ok bro heres a gun👳🏿♂ you can shoot me
also i dont understand wym
RiceUsesArchBtw 38 Reputation
Commented
ill explain in dms
Cancel
Post
https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Comments
TERIHAX 30 Reputation
Commented
uh there is no xaml/xml or wpf category and this cant be in C# bc this is xaml
0