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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Velemoochi
Imran Ghani
Post New Web Links

Require a Window whose content will resize as the winow is resized

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :Windows Application
 

Respected Sir/Mam

I want to code for a window whose content must automatically fit into the window as the window is resized by the user

For Example:Gmail Window all contents are perfectly resized when you resize the window

Thanking You

Salim Shaikh




View Complete Post


More Related Resource Links

How to avoid page content wrapping when resize the window

  

How to avoid page content wrapping when resize the window?

i mean when user resize his browser window then the page content

should not be wrap, instead of scroll should appear,

so how can i do that?


How to Customize the Add Comment 'Items on this list require content approval...' notification in

  

WSS 3.0:

If content approval is turned on, the Add Comment section displays a fairly ugly notification. Is there any way I can customize that section through e.g. CSS or SPDesigner?

I'd like to change at least the text, and preferably the yellow exclamation image, and also the background if possible.


How to resize iframe when content loads..

  
I have an iframe on website A which receives the controls from website B once the form is processed on website B. Here is the page on website A with the iframe. I have hard coded the height at 100px:<iframe id="hdnFrm" name="hdnFrm" src="" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="width:90%;height:100px"></iframe> <form action='http://www.link-exchangers.com/adv_links_addber.aspx' target='hdnFrm' method='post' name='form1'> <table width=90% align=center cellpadding=2 cellspacing=0 border=0> <tr><td valign=top>Contact email: </td><td><input type=text name=web_email value="<?=$web_email;?>" style='width:250px'></td></tr> <tr><td valign=top>Reciprocal link: </td><td><input id=web_recip type=text name=web_recip value="<?=$web_recip;?>" style='width:250px'></td></tr> <tr><td colspan=2 align=center><input type=submit value="Save" style='width:100px'></td></tr> </table></form> Once the Save button is clicked, website B processes the data in this form, and sends messages and a

Dynamic Content In A ModalPopupExtender & Open A New Browser Window

  
Ok, after searching on how to do this and trying many different ways and failing, I finally got something working.  So, I decided to post it here to help anyone else that might be trying to do the same thing.  If anyone sees a better way to do this then please let me know. I want to populate an update panel with addresses so I use a repeater.  I want the user to click a link and that causes a modal popup to appear for the user to enter thier address so that they can get driving directions to the address listed in the Repeater.  I needed a way to get the address the user was driving to, to also be inside the modal popup because I need to pass it along later.  The reason the list of addresses are in an updatepanel are for paging purposes.  I've used a simple version of the repeater in this example though.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <body> <form id="Form1" method="post" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="myMainPanel" runat="server" EnableViewState=false> <ContentTemplate> <asp:Repeater ID="rptItems" runat="server" EnableViewState=false> <ItemTemplate>

Help with Response.Content open in new window?

  
Hey guys, I have a button that when clicked on it will open a pdf file in the current window. Can someone help me modify my code to open in a new window? Here's what I have so far that works when the button is clicked:if (pdf != null) { Response.Expires = 0; Response.Buffer = true; Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = "application/pdf"; //stream it back in the HTTP response Response.BinaryWrite(pdf); Response.Flush(); try { Response.End(); } catch { } }  

Problems with Master Page and content window

  
I have a master page whose primary function is to allow a user to search for a Credit Union.  They can either search by ID # or search by name.  With processing this page it will set session variables which in turn I would hope would be passed along to the content window. Within the content window I am displaying the information that will be needed on that particutlar page, if no record is found then it will allow them to add.  I also need it to clear the fields in the content window if they go from one record with data to one without.  Now if a user types in the ID#, then it doesn't seem to have any problems populating the content window.  The problem comes when they try and search by name.  If more then one record is returned then it will populate a listbox.  Which then I would like a user to select the name they are searching for and then populate the search boxes as well as process the content window. The problem I seem to be facing is the Page Load on the content window.  Session variables don't seem to be set in time for the content window to have the variable available to it. Hopefully you can help me out.Masterpage.master.vb Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'ResetValues() Me._txtCUName.Attributes.Add("onchange", "if(document

AccordionItem will not resize horizontally to its content

  
The AccordionItem WILL scale vertically to its content, but NOT horizontally.  If you expand down the accordion and then back, it resizes though.  SilverLight does not have this issue, but WPF does...  I see a number of related topics to this, but no solutions that are working for me... plus most the topics are about SilverLight, and this problem has been fixed in SilverLight.  Not sure why it hasn't been fixed in WPF... Here is my template control that will not resize as its content does (btw, the content is a treeview which expands horizontally as sub trees are opened): <Style TargetType="local:AccordionWindow"> <!-- Existing Properties --> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Background" Value="#BBAF1E2D" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1,1,0,1" /> <!-- Dependency Properties --> <Setter Property="Header" Value="Toolbar" /> <Setter Property=

AccordionItem will not resize horizontally to its content

  
The AccordionItem WILL scale vertically to its content, but NOT horizontally.  If you expand down the accordion and then back, it resizes though.  SilverLight does not have this issue, but WPF does...  I see a number of related topics to this, but no solutions that are working for me... plus most the topics are about SilverLight, and this problem has been fixed in SilverLight.  Not sure why it hasn't been fixed in WPF... Here is my template control that will not resize as its content does (btw, the content is a treeview which expands horizontally as sub trees are opened): <Style TargetType="local:AccordionWindow"> <!-- Existing Properties --> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Background" Value="#BBAF1E2D" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1,1,0,1" /> <!-- Dependency Properties --> <Setter Property="Header" Value="Toolbar" /> <Setter Property="ExpandDirection&

how to add content to a new opened window

  

Hi all,

i was working on a asp.net webpage and forms. this page contain a form, when user click submit, it will send a email to me. i use javascript to open a new blank window after clicking submit button: 

btnSubmit.Attributes.Add("onclick", "javascript:window.open(''); return false;");

now i want to add email content (some html code) into this new window, so it will display whats in the email to the user.

i have no idea how and where to add these codes. in the .ascx, or code behind file(ascx.cs) or i should make a new .js file?

 


Sharepoint 2010 "Some content or files on this webpage require a program that you don't have instal

  

This may be a DNS question.

New SP 2010 install, single server lab environment.
I can create and access site collections under the first web application SP2010 (Sharepoint 80, http://sp2010)

I have created another web application, different database, different port (777), and given it a different URL (test.otherdomain.com:777)
I have created a corresponging site collection (default team site).
Opened port 777 TCP incoming and outgoing in the windows firewall
Created a host (A record) in my DNS test.otherdomain.com 192.168.168.5 (IP of the sharepoint server which is really called SP2010.mydomain.com)

nslookup returns the correct IP address, but when I type test.otherdomain.com:777 into a browser window I get
"Some content or files on this webpage require a program that you don't have installed" both from another machine on the network and on the Sharepoint server.

 


Carol

Part of Window content not minimizing with rest of Main Window.

  

I am developing an IDE-like WPF application.  The application's main window from the Microsoft  has a number of child tool windows and tabbed document windows. 

The layout system for the main window's child controls has been implemented using the Composite Application Library.

Recently, a problem arose in which two particular elements of the main application window did not minimize with the rest of the window.  Instead, these two child elements stay up on the screen.  However, I cannot actually click on the unminimized region.  In fact, I can drag items from desktop through the unminimized regions.  The only thing that I can think of that may be causing this is that the content that doesn't minimize is executing within a separate AppDomain.  The two UIElements from the different AppDomain are remoted from an Add-In (System.AddIn).

Has anyone else experienced a similar windowing problem?


wpf - HierarchicalDataTemplate, VirtualizingStackPanel, Window Resize (maximize)

  

Hi,

I am having a problem with a wpf treeview that uses a HierarchicalDataTemplate in conjunction with a VirtualizingStackPanel. Using the code provided below, I run the application and expand all the treeviewitems.

http://img227.imageshack.us/img227/3536/wpftv03.png

I then make the viewport "small" so that items are virtualized. I scroll to the bottom and select the last item.

http://img291.imageshack.us/img291/9020/wpftv01.png

I then maximize the window :

http://img706.imageshack.us/img706/607/wpftv02.png

It seems that on (but not limited to) Maximize, not all the treeviewitems are being realized. I am stumped what the problem could be. Any help would be appreciated! :D

(this also happens in win7 when you "dock" the app to fill half the screen)

App.xaml



<Application x:Class="WpfApplica

New window with width and height identitical to the page content

  

hi all forum

I have my NewsDetails.aspx page which displays a certain news  in a gridview according to the NewsId query string field. i wish to make the user able to print the page or mail it to a friend  so I used the following code

protected void ArticleGrid_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "print")
        {
            int NewsId = int.Parse(e.CommandArgument.ToString());
            string url = "ForPrint.aspx?NewsId=" + NewsId;
            string js = "<script language='JavaScript'>window.open('" + url + "','" + ArticleLbl.Text + "',";
            js += "'top=0,left=0,status=no,width=710,height=700,resizable=no,scrollbars= yes');";
            js += "</script>";
            ClientScript.RegisterClientScriptBlock(this.GetType(), &

Resize pop-up window dynamically

  

HI all,

From my web page, I open a  pop-up window with some dynamic list of controls depending on the data from main page.

Is there any way to  dynamically set the pop-up window size  or resize the length and width if the pop-up window so that it displays only the dynamic controls , eliminating the extra spaces.


Programtically resize window

  

For some reason I can't programatically resize a window anymore.  I used to be able to say:

  var r = new Rect(window.RenderSize);
  r.Width += width;
  r.Height += height;
  window.Arrange(r); 

and the window would resize.  But now it doesn't.  What happened?



How to change the SplitterDistance to resize the content?

  
I have a splitter panel containing a tab control (Dock = Fill !). When I change the SplitterDistance programatically the size of tab does not change so the two scroll bars appear. What to do after changing SplitterDistance in order to disappear the scrollbars?
Gabriel

SP.UI.ModalDialog.showModalDialog - resize window dynamically

  

We have created a SP.UI.ModalDialog.showModalDialog popup. Length and width of the widow is specified when created. Now, we want to open another page in the same popup with different width and height of the popup window.

We open new page in the existing popup window just by creating a <asp:HyperLink>. Getting it on server-side and setting its  "NavigateUrl" = "NewPage.aspx" to new page and "Target" = "_self". But this "NewPage.aspx" has different width and height. We want to change width and height of popup window as per "NewPage.aspx"

Any help?


http://farhanfaiz.wordpress.com
Categories: 
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