Placeholder Text Box - WPF UI COMPONENT WORKSHOP

  Рет қаралды 11,227

SingletonSean

SingletonSean

Күн бұрын

Пікірлер: 28
@HackelSchorsch
@HackelSchorsch Жыл бұрын
A 12 minutes video for a placeholder. I think this is the point where I leave the WPF path and do something useful with my lifetime.
@Azimof161
@Azimof161 Жыл бұрын
Instead of making the textblock opacity 50%, I had an issue when the background was red and the foreground was white. I added a dependencyProperty PlaceholderTextColorBrush. So now I can control the colour of the text from the calling code. And no issue when the textrblock is visible. Instead of adding ZIndex, I did what you did in the source code. I put the scrollviwer first. This is so helpful thanks.
@krccmsitp2884
@krccmsitp2884 2 жыл бұрын
Your step-by-step with trial and error approach makes the how and why easy to follow and instructive. 👍
@JordanLenz
@JordanLenz 2 жыл бұрын
This could not have come at a better time. Thanks!
@stan101
@stan101 2 жыл бұрын
Hi Sean, thanks for the tutorial. I wanted to ask if there is a reason why you don't inherit from MarkupExtension in your converter. It gives you the option to use the converter from the WPF without resource definition. It is, however, an abstract class. I saw it some time ago, and now I use it all the time, but maybe it's not that good. Or is that just a subjective preference? Thanks.
@MsQlan
@MsQlan 2 жыл бұрын
Hi Sean, thank you for the excellent tutorial. This just made my day. I have a search bar that is displayed through a modal pop up where I wanted to clarify the functionality without cluttering the UI with additional components. I might also add a ViewBox to the component for possible icon support 😅
@SingletonSean
@SingletonSean 2 жыл бұрын
Haha, great timing MsQlan! Glad this was helpful, I definitely agree that this is great for reducing UI clutter.
@rhoharane
@rhoharane 2 жыл бұрын
I had an unexpected visceral reaction to !(value is Thickness padding). I think in newer C#, you can now say (value is not Thickness padding) But it’s good to teach it the old way in case people aren’t on the latest. Thanks again for the great tutorial!
@sergeys5270
@sergeys5270 2 жыл бұрын
Great video! Very good WPF channel! Please make a video with controls: Search Control - with a drop down list of items when searching. And Wizard. Thank you!
@JarosawPietras
@JarosawPietras 2 жыл бұрын
I was just looking for how to make a TexBox with an icon and an inscription inside. THX
@charlesgantz5865
@charlesgantz5865 2 жыл бұрын
Great tutorial. I did run into one problem that took me a little while to figure out. When running the program, I was getting an "Object reference not set to an instance of an object" error. I had the IsEmptyProperty declaration ahead of the DependencyPropertyKey IsEmptyPropertyKey declaration. The IsEmptyProperty declaration has to be after the IsEmptyPropertyKey declaration in order to initialize it at the correct time during startup.
@sergeyshevtsov9253
@sergeyshevtsov9253 2 жыл бұрын
Another great video! Thanks
@yz777zhumabayev6
@yz777zhumabayev6 2 жыл бұрын
Thank you very much! Question - how it is possible to make in TextBox a cross tag for search cancellation command?
@hel2x
@hel2x 2 жыл бұрын
Hey, thanks for the very useful tutorial. Do you know how refresh(with mvvm) Listbox content?
@senthilkumar-fy1cq
@senthilkumar-fy1cq Жыл бұрын
can you make the video for a custom chart using wpf MVVM
@tanzib82
@tanzib82 2 жыл бұрын
Hello Sean, Great tutorial as usual. I have been following this tutorial to make a Textbox with Floating Label and Hint that changes visibility and Animates when the TextBox gets IsKeyboardFocused. I was wondering how will you approach TemplateBinding a dependency property (eg. IsFocusedBorderColour) inside a Trigger and apply that to the BorderBrush, so that in use case one can give the brush in a window, page or user control. and in addition to that can create a default style theme that can be referenced to in xaml. My attempts failed so far, and seems Binding instead of TemplateBinding is required? Sorry for the long question and if it is out of topic. Regards
@SingletonSean
@SingletonSean 2 жыл бұрын
Hey Tanzib! I've had similar issues with TemplateBinding in the past. As you suggested, I think we'd have to use a regular Binding. Have you tried a Binding with RelativeSource=TemplatedParent?
@tanzib82
@tanzib82 2 жыл бұрын
@@SingletonSean Hi Sean, I tried TemplatedParent and Ancestor. It works but if I create a base style in the application project Resource.Dictionery. and do not pass a parameter for the property when I impliment the control in a user Control, it throws a null exception.
@tanzib82
@tanzib82 2 жыл бұрын
@@SingletonSean I was thinking is there a way to declare a brush in the custom control and template bind the brush to the dependency property? And call that brush in the trigger as DynamicResource?
@JarosawPietras
@JarosawPietras 2 жыл бұрын
How style custom control from library? custom control do not apply defined covered style for TextBox, I must define key name?
@krccmsitp2884
@krccmsitp2884 2 жыл бұрын
Have you considered an adorner instead?
@SoloEnLaCasa
@SoloEnLaCasa 2 жыл бұрын
Hi Sean, excellent explanation, so you can reduce code in XAML. Are you maybe planning to make a Placeholder for PasswordBox? it would be great if you have time to do what I just mentioned. take care and keep up the excellent work
@SingletonSean
@SingletonSean 2 жыл бұрын
Hey MGA, I think that would be useful! I imagine it would be very similar to this implementation, but just using a bindable PasswordBox instead of a TextBox. I wish PasswordBox and TextBox were more interchangeable though. Anyways, good suggestion! I will consider implementing this. Thanks!
@clxakz
@clxakz 8 ай бұрын
in python you'd use placeholdertext="Placeholder Text" but i guess wpf is too modern for that
@SingletonSean
@SingletonSean 8 ай бұрын
Yep WPF likes to challenge us 😂
@floriandraxler3868
@floriandraxler3868 6 ай бұрын
WindowsForms did it that simple as well, why WPF whyy
@marcocito9269
@marcocito9269 2 ай бұрын
WPF is very powerful once you get used to creating your own custom controls, but its library of base controls is half baked.
@clxakz
@clxakz 2 ай бұрын
@@marcocito9269 yeah but i use electron, might be slower but a 100 times easier
Dropdown - WPF UI COMPONENT WORKSHOP
14:43
SingletonSean
Рет қаралды 11 М.
Creating Reusable Controls - WPF TUTORIALS
17:10
SingletonSean
Рет қаралды 31 М.
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 24 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,6 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 121 МЛН
Create a Dashboard - WPF TUTORIALS
9:20
SingletonSean
Рет қаралды 4,9 М.
WPF Custom User Control + Dependency Properties
11:12
ToskersCorner
Рет қаралды 56 М.
НОВАЯ LADA AURA. УДИВИТЕЛЬНЫЙ "ПРЕМИУМ".
29:34
AcademeG DailyStream
Рет қаралды 647 М.
ItemsControl (the "for loop" of XAML) - WPF TUTORIALS
10:04
SingletonSean
Рет қаралды 11 М.
Popup / Modal - WPF UI COMPONENT WORKSHOP
16:21
SingletonSean
Рет қаралды 16 М.
Loading Spinner - WPF UI COMPONENT WORKSHOP
19:23
SingletonSean
Рет қаралды 21 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 224 М.
C# WPF Tutorial #21 - Styles and ControlTemplates
12:53
Kampa Plays
Рет қаралды 19 М.
How To Create Custom Controls in WPF
28:03
Tactic Devs
Рет қаралды 36 М.