WindowControl - unable to activate

Docking/MDI for WPF Forum

Posted 13 years ago by Bret Naughton
Version: 10.2.0531
Avatar
Hi,

I am trying to create a dialog box that will eventually be used to hold the PasswordBox control for security logins. The dialog box will be triggered from a button in the Ribbon bar.

Unfortunately I have started to experiment with the WindowControl thinking that I could use this to act a dialog for the PasswordBox and OK/Cancel buttons. So far I have been unable to successfully activate the Windowcontrol (comes back as false).

In the XAML everything I use in my current application (docksites etc.) is held within the following:

<ribbon:RibbonWindow x:Class="Window" x:Name="Window"

</ribbon:RibbonWindow>


To test, in my code (VB.NET) within the class for "Window", I have created a subroutine with the following code, to test that a WindowControl can be raised and I have this triggered from a ribbon bar button.


DialogTest = new WindowControl
DialogTest.HasCloseButton = False
DialogTest.ResizeMode = Windows.ResizeMode.NoResize
DialogTest.Title = "Set Password"
DialogTest.MinWidth = 300
DialogTest.MinHeight = 300
DialogTest.Left = 100
DialogTest.Top = 100
msgbox(DialogTest.Activate.ToString)

It holds no content for now, but I assumed I would be able to show a blank control. Unfortunately as I mentioned, nothing is displayed and the value of the "activate" is false.

Appreciate if you have any ideas as to what I am doing wrong.

Bret

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bret,

Unfortunately, we'd need a small sample project to determine the problem. The Activate method is ultimately calling the WPF Focus method, which seems to be returning false (which is returned by Activate). You may try putting a focusable control in the content, that may workaround the issue.

If that doesn't help, please send a small sample project to our support address and we can take a closer look.


Actipro Software Support

Posted 13 years ago by Bret Naughton
Avatar
Thanks, I have resolved this.... I created a a separate class window/file to provide the dialog box and used the WindowControl and now all is fine.

Thanks
The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.