.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Window resizing problem?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

Hi all,

This is my first post and i am not sure how to start explaining my problem, but i want to try.  I am designing a WPF app. The problem i am facing is related to resizing the app's window. I will break the app into the components i am using to give a better picture.



1. A panel - left hand side

2. A tab usercontrol with four tabs(A,B,C,D) - right hand side.


tab A has a text editor from another xaml file(on left hand side) AND another display on the right hand side. Now when i try to resize the window after building the app, the window just starts to hide the display on the left hand side by eating it up.


Is there a function/variable in the WPF designer that i can use to do the resizing such that the compnents in the window will adjust there sizes to accomodate with the mainwindow size??





View Complete Post

More Related Resource Links

Problem displaying a page using window.showModalDialog when resizing it.

 Hi, I have a page that is displayed using window.showModalDialog, when the page is resized the tables, text boxes and everything else that is in the page with the width 100% doesn't resize (fit the page) unless a post back is used.How can I make the page keep everything in proportion when it is resized without the need to post back? 

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

Problem when displaying a popup window

Hi all,
I am working on a project in which when I clicked a hyperlink a pop up window has to be displayed for 2 pages.
But at first when i did this in javascript it worked, later after i finished the whole coding suddenly an error box displayed that there is an error in webpage and want to debug

Problem to install MS SQL 2005 on Window 7 Operating System

Hi, I recently have problem to install MS SQL 2005 on Window 7 Operating System. Setup showing an error for compitability issues. When click on to button to check for solution online, after a while it pop up that No solutions found for Microsoft SQL Server 2005. Any one know solution for this? Is is possible to install Microsoft SQL Server 2008 on Window 7 and migrate data from Microsoft SQL Server 2005 to 2008? Please advice. Appreciate your help. Thanks.

Problem with closing window in ie 6 sp 3 after download using Response.BinaryWrite

Hi all, I currently having problems in closing a page that launches a download (using Response.BinaryWrite) opened using IE 6 sp 3. All other versions of IE it closes fine. This page was opened using window.open. Below is a sample code of what i am trying to achieve: protected void Page_Load(object sender, EventArgs e) { Response.Clear(); //Specify the document type. Response.ContentType = "application/word"; //Specify how the document is sent to the browser. Response.AddHeader("content-disposition", "attachment; filename=MyDasddsaocument.doc"); //Get data bytes from the file and send it to the response. byte[] bytes = System.IO.File.ReadAllBytes(@"C:\\Temp\\in.doc"); Response.BinaryWrite(bytes); Response.End(); Page.ClientScript.RegisterStartupScript(this.GetType(), "CloseMe", "window.close();", true); } I hope someone can help me with this issue. Thank you in advance.

Timeout child window problem

The users of our site have reported a problem where when you have a child window open and click around in the main window, the child window will time out even though there is activity in the main window. We use an encryptedFormsAuthenticationTicket and http cookie that expires after a timeout period using Response.Cookies.Add(authCookie). Is there an obvious problem from this description? We are using the back button prevention like so:   Response.AppendHeader("Cache-Control", "no-cache") Response.AppendHeader("Cache-Control", "private") Response.AppendHeader("Cache-Control", "no-store") Response.AppendHeader("Cache-Control", "must-revalidate") Response.AppendHeader("Cache-Control", "max-stale=0") Response.AppendHeader("Cache-Control", "post-check=0") Response.AppendHeader("Cache-Control", "pre-check=0") Response.AppendHeader("Pragma", "no-cache") Response.AppendHeader("Keep-Alive", "timeout=3, max=993") Response.AppendHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT")  Could this cause timeout problems in child windows? Any suggestions?

A problem about CreateWindow - "balloon (tool) tip text window"

I dlike to use balloon tool tip text "TTM_ADDTOOL" in global environment. now..,I am using a code which works fine but in the main form - in my own app only..When i use mainwindowhandle of notepad it doesnt works - tooltip is not displayed. When my mouse cursor is away from my form and my mouse cursor is above notepad = tooltip is not displayed. Does exist any solution which will displaying baloon tipText on concrete coordinate? Any idea, solution, link..? more concrete.. I Tryed to create new tip window on concrete coordinate. Code is compiled., without errors, but new window is not visible. Somebody who can help me?   // Create an instance handle. Asm = Assembly.GetExecutingAssembly(); hInstance = Marshal.GetHINSTANCE(Asm.GetModules()[0]); // Create the ToolTip window. WinHandle = CreateWindowEx( WS_EX_TOPMOST, TOOLTIPS_CLASS, "Balloon Help Message" , WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, 50, 50, 320, 240, IntPtr.Zero, IntPtr.Zero, hInstance, IntPtr.Zero); //display tool tip ShowWindow(WinHandle, 1);  

Problem with hosting wcf service using window service in window 7

Hi all! I have a wcf service, I hosted susessfuly in winxp, but in window 7, it throw an excaption like that Message="HTTP could not register URL http://+:8000/EchoService/. Your process does       not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). After that, I tried to run the  following command on window 7  to configure HTTP:             netsh http add urlacl url=http://+:8000/MyUri user=DOMAIN\userid I get error  Then, I run as Administrator and execute the above command, I get an error like here Create SDDL failed, Error: xxx The parameter is incorrect. I dont know why, and  how to fix the problem. Please help me!   Thanks all.    

Problem on opening child window on third time



I have a button that having an attributes as follow:

btnAddColumn.Attributes.Add("onClick", "selectDetailColumn('Type1',1); return false");

It will open a child window with the following assignment.

<script language="javascript" type="text/javascript">

        function selectDetailColumn(area, testType) {
            scLeft = (window.screen.availWidth - 600) / 2;
            scTop = (window.screen.availheight - 700) / 2;
            window.open('Details.aspx?, 'PopUp', 'width=600,height=700,top=' + scTop + ',left=' + scLeft + ',toolbars=no,scrollbars=no,status=no,resizable=no');

On this details.aspx, I have button to close the form as below:

<asp:Button ID="btnClose" runat="server" Width="80" Text="Close" OnClientClick="window.close();" />

What I did is when I open the child window, I will click on the Close button. I will repeat this process again. And on the third time I open the child window again, it wont open it, but instead the page "stays loading...".

Seems like the IIS is not responding.

window.onscroll problem in ie6


hi guys,

Nedd some help on fixing scroll position of a div in ie6

below is the java script and div

On scroll the div must be in fixed place and the content under that need to scroll, but everything is scrolling Cry

var yPos = document.documentElement.scrollTop;
            var xPos = document.documentElement.scrollLeft;
            if (isNaN(yPos))
                yPos = 0;
            if (parseInt(yPos) < 180)
                divHeader.style.top = (180 - parseInt(yPos)).toString() + 'px';
                divHeader.style.top = '0px';

            if (isNaN(xPos))

Regarding Telerik RadGrid Control Resizing problem in MOSS2007


If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,Now plaease suggest that How can radgrid column can be resized by user at run time programatically?

Login problem with existing browser window


Hi All,

We are developing ASP.net 2.0/C# web application.

Once Login is expired the page is redirected to login page automatically. again If I am trying to login with same window, login is not working. Login is working when the application is opened in new browser.

What is the problem and how can i fix that error?

Problem with a Javascript Popup Window Minimizing itself


I am new to Javascript.  I have seen other posts about this, but I have not been able to resolve my problem. I have a WebPage that allows a user to click a LinkButton. When the LinkButton is clicked. I execute the following Javascript code after registering the ClientScriptBlock:

<script language='Javascript'>
PopupWindow = window.open('StandardImageLookupPage.aspx','PopupWindow');
PopupWindow.resizeTo(screen.width, screen.height);

No matter what I do the popup window comes up for a brief second and then minimizes itself. I prefer that the window stays maximized.

I am stumped. Any help would be much appreciated.

ps. I am not sure if this makes a difference, but the WebForm that calls this javascript is a user control.

javascript window.open problem



i have a page(A page) which has a linkbutton on it and i have added the following onattribute method which opens a new popup window(B page)


"onclick", "window.open('" & likeLink & "','newwindow','location=no,toolbar=no,directories=no,menubar=no,width=300,height=400,resizable=yes,scrollbars=yes,top=200,left=250,status=no'); return false;")

now on page B which has poped up there are some links

here is

How make Controls scalable when resizing Window?


How do I make my Controls scalable in relation to the size of the Form?

I mean, when the Anchors of a Panel on a Form are set to all 4 borders then the Panel Width/Height properties change when changing the Form size but the Left/Top position of the Panel is fixed and not changing. What properties do I have to set to what value to also make the Panel's Left/Top position move when the undelying Form size is changed?



Problem with resizing DataGridView columns

When i resize a column in a DataGridView control the Click event is fired. Is there a way to prevent that?

Right Click on LinkButton Open in new window Problem



There is a textbox , button  and gridview(contains linkbutton in template field)  in my webpage. If the user enter some text in the textbox and press button means it will search the text in the interrnet and display the text in gridview (like www.google.co.in website).

if the users clicked the linkbutton in the gridview item i want to save the "clicked link" and "searched text" in the database.

If the user clicks the linkbutton in the gridview, i captured the server side event of gridview_rowcommand and wrote the code to save the details in the database. But i cannot get the event of mouse rightclick event of "open in new tab" and "open in new window" option in server side and in javascript.

how can i get the event of mouse rightclick "open in new tab" and "open in new window"?







ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend