Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In kinect the co ordinates of the main window starts from the centre(view area) of it.
I want to scale this window to the specified size like 640*480.
I am using C# for this.
need your help regarding this plzz help.
Thank you in advance.

Note : I don't want to use any libraries for this.
Posted
Comments
S@53K^S 2-Apr-12 9:49am    
Set the minWidth and minHeight Properties of the window then it will be scaled to that level

1 solution

MinWidth , Width, and MaxWidth are used to manage the range of widths that a window can have during its lifetime, and are configured as follows.

C#
<window>
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    MinWidth="300" Width="400" MaxWidth="500"></window>


Window height is managed by MinHeight, Height, and MaxHeight, and are configured as follows.

C#
<window>
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    MinHeight="300" Height="400" MaxHeight="500"></window>

The following code shows a window that automatically sizes to fit its content, both vertically and horizontally
C#
<window>
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    SizeToContent="WidthAndHeight">
</window>


In your example you would set the following.
C#
<window>
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   MinHeight="640"  MinWidth="480"></window>
 
Share this answer
 
Comments
ravithejag 3-Apr-12 0:32am    
Thanks oliver

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900