2

i have a program of WPF using .Net C#.

please help me how to make my program can read edge of screen so that can window snapping.

John Saunders
  • 159,224
  • 26
  • 237
  • 393
yozawiratama
  • 3,947
  • 11
  • 53
  • 98

1 Answers1

0

you can use SystemParameters.WorkArea rectangle Or
SystemParameters.PrimaryScreenWidth and SystemParameters.PrimaryScreenHeight for screen size.

Navid Rahmani
  • 7,688
  • 9
  • 36
  • 57
  • Not a good idea because it will not take into account the taskbar or other docked windows. If anything, SystemParameters.WorkArea gives the usable "desktop" region on the primary monitor. But a proper solution should taken into account multiple monitors. http://msdn.microsoft.com/en-us/library/dd162729.aspx – Josh Jun 17 '11 at 02:32