Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WPFC#4.0
Hello everybody...
i want to make login screen in wpf. it will circle form. is it possible ?
Posted 16-Nov-12 10:32am
Sergey Alexandrovich Kryukov at 16-Nov-12 16:44pm
What is a "form in WPF"? WPF does not have forms, if I'm not much mistaken. Do you mean a window with true round shape? This is not a problem at all... --SA
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Please see my comment to the question. Is that what you need?
If so, one of the way to do it is to assign some instance of System.Windows.Media.Geometry of non-rectangular shape to the property System.Windows.Window.VisualClip:[^],[^],[^].
This method is the cleanest one: not only a window looks non-rectangular visually (like it would look with transparency), but is also transparent to mouse events, for example: you click mouse in the corner; and the window of the application beneath is activated — this is something you really need.
It's also good to use WindowStyle="None"; to avoid showing non-client areas of the window.
Another way is related to Background, AllowsTransparency, and WindowStyle properties:[^] (read: "Non-Rectangular Window Style"),[^].
Good luck,
Espen Harlinn at 17-Nov-12 8:57am
Sergey Alexandrovich Kryukov at 17-Nov-12 21:18pm
Thank you, Espen. --SA
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This might be what you are looking for: Shaped WPF Form[^]
Sergey Alexandrovich Kryukov at 16-Nov-12 16:57pm
Good link, a 5. I also answered, suggesting two different ways, and explained some important detail -- please see. --SA
Sergey Alexandrovich Kryukov at 16-Nov-12 17:10pm
Actually, after a better look: this article suggests not the best solution -- the one based on transparency. Much better solution is based on VisualClip; again, please see my answer. --SA
Espen Harlinn at 17-Nov-12 8:56am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 534
1 OriginalGriff 312
2 Damith Weerasinghe 300
3 thatraja 220
4 ravikhoda 210
0 Sergey Alexandrovich Kryukov 10,974
1 OriginalGriff 6,667
2 Peter Leow 4,760
3 Abhinav S 3,813
4 Maciej Los 3,565

Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid