none
how to maximize and minimize the user control

    Question

  • I have sitepage in sharepoint designer where i place usercontol and now i need to maximize and minimize the user control.

    Please help


    sree

    Wednesday, April 25, 2012 6:00 AM

All replies

  • Hello,

    I don't really understand your question. If you are working with SPD, you can always drag/resize the user control.

    -Riwut-


    Best regards,

    Riwut Libinuko
    SharePoint Architect, Singapore
    Microsoft MVP | SharePoint Server | Singapore
    Blog : http://blog.libinuko.com

    Sunday, April 29, 2012 4:07 PM
  • If you are looking for a functionality just like a webpart's minimize, you can install a SmartPart,  and then add it to the desired location on the sitepage and then refer to your user control.

    Hope this helps.


    Rahul Gupta, MCITP, MCPD - SharePoint 2010

    • Proposed as answer by Aviw_ Sunday, April 29, 2012 7:11 PM
    • Unproposed as answer by Steven AndrewsEditor Thursday, May 03, 2012 11:55 AM
    Sunday, April 29, 2012 5:53 PM
  • I have developed a visual webpart and i need to provide maximize ,minimize options for that user control ,how to acieve this functionality ?please revert in case of any clarifications. please help.


    sree

    Monday, April 30, 2012 3:07 AM
  • Try to check your web part properties, by default restore and minimize options will be available for all web parts

    It is a default behavior for all web parts in the SharePoint 

    Monday, April 30, 2012 6:56 AM
  • ok. i have developed user control for which i need to use the maximize and minimize for that custom webpart>?

    sree

    Monday, April 30, 2012 7:26 AM
  • One thing I want to say, Minimize or maximize is the property of WebPart not UserControl. You can develop a webpart without UserControl which have maximise and minimize functionality (it comes by defult when you deploy your webpart to sharepoint and add it to sharePoint site). Now if you want to use UserControl inside your webpart (why: Because if are not using usercontrol, then you have to maintain your look and feel by code, but in case of usercontrol you can control the look and feel at design time also). you can use Visual WebPart in SharePoint 2010 for WebPart+UserControl. 

    Jayant Sharma

    Monday, April 30, 2012 9:07 AM
  • ok as am very new to programming and using object model concepts wondering how to bring in this webpart property inside the user control.appreciate some references.thanks

    sree

    Monday, April 30, 2012 9:33 AM
  • Micrsoft tutorial on Visual WebPart

    http://msdn.microsoft.com/en-us/library/gg413295.aspx


    Jayant Sharma

    Monday, April 30, 2012 11:02 AM
  • Appreciate your help....

    I wanted to display in minimize and maximize and not in tree view approach. as you told its a default webpart action of minimize and maximize and i tried as well in designer but challenge is am getting the edit and close which i do not want in my implementation thats why i want to achieve only minimize and maximize option


    sree


    • Edited by sree_23 Monday, April 30, 2012 11:27 AM
    Monday, April 30, 2012 11:18 AM
  • Hi Sree

    Minimize and maximize are options which are available for all the webparts, since you are developing a Visual Webpart , it should also have similar properties. Now my question to you is where exactly do you want to minimize the webpart, at UI or programatically.

    You can utilize the WebpartManager class to minimize/maximize the webpart through code or else you can do it from UI in Edit Page mode. I dont think so you will get a minimize option in the designer.

    Hope this helps.


    Rahul Gupta, MCITP, MCPD - SharePoint 2010

    Monday, April 30, 2012 1:52 PM
  • i have to achieve by programmtically...can i achieve through javascript?  please help 

    sree



    • Edited by sree_23 Wednesday, May 02, 2012 5:30 AM
    Wednesday, May 02, 2012 5:21 AM
  • check this: http://msdn.microsoft.com/en-us/library/ee658631.aspx

    LimitedWebPart Manager of SP JS Client Object Model can help you with that.


    Rahul Gupta, MCITP, MCPD - SharePoint 2010

    Wednesday, May 02, 2012 1:31 PM
  • I tried using the webmanager in my button click...

                   if (webpart.Title.Contains("sample"))// sample is my webpart name
                            {
                                webpart.Visible = true;
                                webpart.ChromeState = PartChromeState.Normal;
                                webManger.SaveChanges(webpart);
                            }  pls help


    sree

    Thursday, May 03, 2012 9:57 AM
  • it will not work on just your button click assuming you are running this code on server, you will have to reload the page since the property of the webpart has been set but the page has to be re-rendered.

    Rahul Gupta, MCITP, MCPD - SharePoint 2010

    Thursday, May 03, 2012 1:30 PM
  • oh ok.so where should i put this piece of code on page load ? but i have minimize state

    sree

    Friday, May 04, 2012 5:20 AM