Modal Window in Smart Parts
-
Hi All, Will anyone help in opening a View which is having its own Interface and Presenter. I want to open this view from base presenter in ModalWindow style. I need a sample application so that i can understand better.. Thanks in advance Umashanker.K
-
Hi All, Will anyone help in opening a View which is having its own Interface and Presenter. I want to open this view from base presenter in ModalWindow style. I need a sample application so that i can understand better.. Thanks in advance Umashanker.K
umashankergr8 wrote:
I need a sample application so that i can understand better..
Sorry. I can't create or upload the sample for you but I will tell you the steps that you need to follow to open the view in popup form. (I believe that you have some ideas about CAB (Composite UI Application Block) Frameworks and terms.) #1. First, you need to add the View in WorkItem or ModuleWorkItem. Dim objMyView As MyView = WorkItem.SmartParts.AddNew(Of MyView)(MyNamespace.Constants.SmartPartNames.MYVIEWID) Note: If you are using SCSF, you can write the code above in AddView() methods. #2. Add a form to your project and put the DeckWorkSpace in this form. #3. Write the code below in your presenter when the view raise the event of presenter.
Dim formPopUp As New Infrastructure.UI.Form() formPopUp.Title = "MyView" formPopUp.StartPosition = FormStartPosition.CenterScreen formPopUp.FormBorderStyle = FormBorderStyle.FixedDialog formPopUp.MaximizeBox = False formPopUp.MinimizeBox = False formPopUp.ShowDialog()
Note: Infrastructure.UI.Form should have one more constructor like thatPublic Sub New(ByVal view As Control) Public Sub New(ByVal view As Control) InitializeComponent() Me.ClientSize = New System.Drawing.Size(view.Width, view.Height) Me.SuspendLayout() view.Dock = DockStyle.Fill 'Adding View to Form '--------------------------------- Me._contentPanel.Controls.Add(view) '' Note: _contentPenel is deckworkspace control. Me.ResumeLayout() '--------------------------------- End Sub
That's all.. Hope it helps..Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)
-
umashankergr8 wrote:
I need a sample application so that i can understand better..
Sorry. I can't create or upload the sample for you but I will tell you the steps that you need to follow to open the view in popup form. (I believe that you have some ideas about CAB (Composite UI Application Block) Frameworks and terms.) #1. First, you need to add the View in WorkItem or ModuleWorkItem. Dim objMyView As MyView = WorkItem.SmartParts.AddNew(Of MyView)(MyNamespace.Constants.SmartPartNames.MYVIEWID) Note: If you are using SCSF, you can write the code above in AddView() methods. #2. Add a form to your project and put the DeckWorkSpace in this form. #3. Write the code below in your presenter when the view raise the event of presenter.
Dim formPopUp As New Infrastructure.UI.Form() formPopUp.Title = "MyView" formPopUp.StartPosition = FormStartPosition.CenterScreen formPopUp.FormBorderStyle = FormBorderStyle.FixedDialog formPopUp.MaximizeBox = False formPopUp.MinimizeBox = False formPopUp.ShowDialog()
Note: Infrastructure.UI.Form should have one more constructor like thatPublic Sub New(ByVal view As Control) Public Sub New(ByVal view As Control) InitializeComponent() Me.ClientSize = New System.Drawing.Size(view.Width, view.Height) Me.SuspendLayout() view.Dock = DockStyle.Fill 'Adding View to Form '--------------------------------- Me._contentPanel.Controls.Add(view) '' Note: _contentPenel is deckworkspace control. Me.ResumeLayout() '--------------------------------- End Sub
That's all.. Hope it helps..Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)
-
...you just wrote a VB sample in the C# forum. BLASPHEMER!!!
"I need build Skynet. Plz send code"
Alaric_ wrote:
..you just wrote a VB sample in the C# forum.
Hi Alaric_, VB.NET code and C# are very easy to change since there are a lot of auto-converters available on internet.. so, it doesn't really matter whether the code is written in C# or VB.NET.
Alaric_ wrote:
BLASPHEMER
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)
-
umashankergr8 wrote:
I need a sample application so that i can understand better..
Sorry. I can't create or upload the sample for you but I will tell you the steps that you need to follow to open the view in popup form. (I believe that you have some ideas about CAB (Composite UI Application Block) Frameworks and terms.) #1. First, you need to add the View in WorkItem or ModuleWorkItem. Dim objMyView As MyView = WorkItem.SmartParts.AddNew(Of MyView)(MyNamespace.Constants.SmartPartNames.MYVIEWID) Note: If you are using SCSF, you can write the code above in AddView() methods. #2. Add a form to your project and put the DeckWorkSpace in this form. #3. Write the code below in your presenter when the view raise the event of presenter.
Dim formPopUp As New Infrastructure.UI.Form() formPopUp.Title = "MyView" formPopUp.StartPosition = FormStartPosition.CenterScreen formPopUp.FormBorderStyle = FormBorderStyle.FixedDialog formPopUp.MaximizeBox = False formPopUp.MinimizeBox = False formPopUp.ShowDialog()
Note: Infrastructure.UI.Form should have one more constructor like thatPublic Sub New(ByVal view As Control) Public Sub New(ByVal view As Control) InitializeComponent() Me.ClientSize = New System.Drawing.Size(view.Width, view.Height) Me.SuspendLayout() view.Dock = DockStyle.Fill 'Adding View to Form '--------------------------------- Me._contentPanel.Controls.Add(view) '' Note: _contentPenel is deckworkspace control. Me.ResumeLayout() '--------------------------------- End Sub
That's all.. Hope it helps..Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)
many thanks for your reply. If you have a sample application then it will be of more useful to me. If you have please give me, of even if you know the link from where i can download please provide me the link.