Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Modal Window in Smart Parts

Modal Window in Smart Parts

Scheduled Pinned Locked Moved C#
help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umashankergr8
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • U umashankergr8

      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

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      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 that Public 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. :)

      A U 2 Replies Last reply
      0
      • M Michael Sync

        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 that Public 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. :)

        A Offline
        A Offline
        Alaric_
        wrote on last edited by
        #3

        ...you just wrote a VB sample in the C# forum. BLASPHEMER!!!

        "I need build Skynet. Plz send code"

        M 1 Reply Last reply
        0
        • A Alaric_

          ...you just wrote a VB sample in the C# forum. BLASPHEMER!!!

          "I need build Skynet. Plz send code"

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #4

          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. :)

          1 Reply Last reply
          0
          • M Michael Sync

            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 that Public 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. :)

            U Offline
            U Offline
            umashankergr8
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups