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 Жыл бұрын
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.
@krccmsitp28842 жыл бұрын
Your step-by-step with trial and error approach makes the how and why easy to follow and instructive. 👍
@JordanLenz2 жыл бұрын
This could not have come at a better time. Thanks!
@stan1012 жыл бұрын
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.
@MsQlan2 жыл бұрын
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 😅
@SingletonSean2 жыл бұрын
Haha, great timing MsQlan! Glad this was helpful, I definitely agree that this is great for reducing UI clutter.
@rhoharane2 жыл бұрын
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!
@sergeys52702 жыл бұрын
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!
@JarosawPietras2 жыл бұрын
I was just looking for how to make a TexBox with an icon and an inscription inside. THX
@charlesgantz58652 жыл бұрын
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.
@sergeyshevtsov92532 жыл бұрын
Another great video! Thanks
@yz777zhumabayev62 жыл бұрын
Thank you very much! Question - how it is possible to make in TextBox a cross tag for search cancellation command?
@hel2x2 жыл бұрын
Hey, thanks for the very useful tutorial. Do you know how refresh(with mvvm) Listbox content?
@senthilkumar-fy1cq Жыл бұрын
can you make the video for a custom chart using wpf MVVM
@tanzib822 жыл бұрын
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
@SingletonSean2 жыл бұрын
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?
@tanzib822 жыл бұрын
@@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.
@tanzib822 жыл бұрын
@@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?
@JarosawPietras2 жыл бұрын
How style custom control from library? custom control do not apply defined covered style for TextBox, I must define key name?
@krccmsitp28842 жыл бұрын
Have you considered an adorner instead?
@SoloEnLaCasa2 жыл бұрын
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
@SingletonSean2 жыл бұрын
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!
@clxakz8 ай бұрын
in python you'd use placeholdertext="Placeholder Text" but i guess wpf is too modern for that
@SingletonSean8 ай бұрын
Yep WPF likes to challenge us 😂
@floriandraxler38686 ай бұрын
WindowsForms did it that simple as well, why WPF whyy
@marcocito92692 ай бұрын
WPF is very powerful once you get used to creating your own custom controls, but its library of base controls is half baked.
@clxakz2 ай бұрын
@@marcocito9269 yeah but i use electron, might be slower but a 100 times easier