WOWW! In every time I watch a video and a question popups in my head you immediately answer it in the video as if you know exactly what I want! Thank youu for your ultimately helpful videoo ❤
@KampaPlays Жыл бұрын
Thanks so much!!
@guilhermebiolchi11796 ай бұрын
I'm here to say thanks from Brazil. Your tutorial is very clear and direct to the point. Thank you for the help.
@ErictheOldLearner2 ай бұрын
At time 4:14 you add a maximize emoji to the content of the btnMaximize - how do you do that please?
@JackieRoxs Жыл бұрын
Thank you so much, I've used WinForms for years, but decided to move to WPF for more UI customizations
@KampaPlays Жыл бұрын
Awesome! It was a hard jump at first, feeling like reinventing the wheel sometimes, but once I was into it, I was hooked!
@jurgenmarkus1345 Жыл бұрын
Thanks!
@KampaPlays Жыл бұрын
Thanks so much! Appreciate that!!
@wookyumkim4669 Жыл бұрын
That is another very practically useful tip! Thank you very much!! 😆😆
@KampaPlays Жыл бұрын
Glad it helped!
@nssalon9 ай бұрын
I love your tuitorial.
@KampaPlays8 ай бұрын
Thanks so much!
@14768 Жыл бұрын
I suppose I could probably test this but when you make a custom title bar like this does it still allow snapping to left / right / top / bottom splits?
@KampaPlays Жыл бұрын
I will say, it *should* continue to allow default windows snapping behaviors, but I have seen issues where certain UI layouts prevent it from working. Great question.
@bartsworkshop11 ай бұрын
I found a bug with the maximize button as the window will go below your taskbar, if you wanna fix it update the code behind to this if (WindowState == WindowState.Normal) { WindowStyle = WindowStyle.SingleBorderWindow; WindowState = WindowState.Maximized; WindowStyle = WindowStyle.None; } else WindowState = WindowState.Normal;
@KampaPlays11 ай бұрын
I'll check this out, thanks for the info!!
@trerouploads81693 ай бұрын
thanbk u so much for the chrome fix stuff
@bioanu Жыл бұрын
Hi Kampa! Very good video about a window customization!! Just a short question: it is possible to add a button inside the TitleBar but without modifying default window style? Thank you!!
@KampaPlays Жыл бұрын
I remember finding a way to do it a very long time ago, but all I really remember about doing it is that it ended up not being worth it. I know this is a bad answer --- but I found this, maybe you can tinker with it and see if it does what you are looking to do? www.codeproject.com/Tips/799302/WPF-Csharp-VB-NET-Additional-fourth-button-on-wind
@bioanu Жыл бұрын
@@KampaPlays Cool! Why I'm asking this: I like to create an app which can switch between touch mode and mouse mode and I like to customize the main window in this idea.
@thecoweggs5 ай бұрын
GOAT
@webdesignsbytom Жыл бұрын
I will remember to go backk and like every video
@KampaPlays Жыл бұрын
Really appreciate it!
@sajmonator732510 ай бұрын
I just wonder. Once you create nice window, how can you reuse it without copying whole bunch of code every time? I can't inherit from custom window, can I?
@KampaPlays9 ай бұрын
Sorry for the delay - You could stick all of your custom window code in a C# library (.dll) and import it into each project. If you mean within the same project, you could create a parent window class and inherit from it.
@WIckedOmenOfThunder Жыл бұрын
Hey Kampa! Could you make a video about MVVM, and how you keep things nice and separated yet functional?
@KampaPlays Жыл бұрын
Hey! Yes, I will be getting to a few videos about MVVM very shortly!
@Jumph96 Жыл бұрын
@@KampaPlays Looking forward to those..👍👍
@fooballers7883 Жыл бұрын
Brilliant tutorials.... Thank you
@KampaPlays Жыл бұрын
Thank you!!
@dakloafitz6347 Жыл бұрын
Hey :) In most windows you can´t just dragmove, but also double klick to maximize the window. First of all, i didn´t use the windows MouseLeftButtonDown event, but a rectangle. DragMove worked. Then i tried to get the doubleClick event, but ractangles dont have those. So i switched it to a button, because those have both events. Now the doubleClick works, but DragMove doesn´t work with a button. Any ideas?
@dakloafitz6347 Жыл бұрын
Got it, I have to use PreviewMouseLeftButtonDown and PreviewMouseDoubleClick :)
@KampaPlays Жыл бұрын
Good addition! If your control you are attempting to drag/hover/click handle isn't a simple space like a grid, the control where your mouse is may precedence of those events depending on what the control itself does. (So you can focus a textbox or enter a datagrid, for example, instead of dragmove taking over those abilities). Nice job figuring it out, this will probably help someone! :)
@robinheyer708 Жыл бұрын
I actually had the dragmove event auto-complete as PreviewMouseLeftButtonDown instead of just MouseLeftButtonDown. Then I spent a few minutes clicking the X and reloading the app like an idiot without anything happening. :P
@KampaPlays Жыл бұрын
@@robinheyer708 Ahhhh! Auto-complete has burned me more times than I'd like to admit 🤣
@GuitarAge Жыл бұрын
Thank you! )
@KampaPlays Жыл бұрын
Glad to help!!
@frednicholson Жыл бұрын
There must be more going on here. I used the windowstyle just like you did and the title bar didn't disappear. In fact, in one case, it goes to the bottom of the window.
@KampaPlays Жыл бұрын
Whaaaat? I can't say that I've ever seen that happen. Can you share your window code with me?
@robinheyer708 Жыл бұрын
That WindowChrome setting put me in a 7px nightmare lol. Maybe I'll just remove the maximize button... :P
@KampaPlays Жыл бұрын
🤔 Interesting! What exactly is it doing? You are using WindowStyle.None?
@robinheyer708 Жыл бұрын
@@KampaPlays Yes, exactly. So now that annoying white bar at the top (which I now know is 7px high) is gone but that also means your window is missing 7px at the top and the sides when you maximize it. Which means part of your buttons will look like they're cut off. I tried a quick fix with making the row 7px higher and then adding 7px margin at the top of the buttons and 7px on the right of the close button but it just ends up looking slightly less dorky than it did with the original white bar. ;)
@KampaPlays Жыл бұрын
@@robinheyer708 Ah!! Yes!! Thank you for pointing this out, it just slipped my mind! (Sorry!) Hopefully your comment will help others as well!!
@rajivlather8918 Жыл бұрын
👍
@tranguyentruc7033 Жыл бұрын
how to write symbol maximize?
@KampaPlays Жыл бұрын
You can use codes, but honestly sometimes, I just search for and copy and paste the unicode character itself: 🗖
@ion47984 ай бұрын
oh, that is simple, but there is one more thing, when window is maximized you must be able to drag window , that is tricky