Hi,
when ever i click on one web part i must get the web part in the same page to be minimized
First, i guess what you mean is get the other webparts in the same page to be minimized, right? In the event, you may get the WebParts name which you clicked first, and make a loop against all WebPart controls on your page, if set all WebPart control's ChromeState attribute to Minimized except the one you clicked. See the following sample:
foreach (GenericWebPart gwps in this.WebPartManager1.WebParts) {
// based on your own codes,try to verify if gwps.ID equals to the webpart's ID you clicked, if not {
gwps.ChromeState = PartChromeState.Minimized;
}
Hope that helps. Thanks.
Sincerely,
Michael Jin.
Microsoft Online Community Support
?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?