How to programmaticaly unpin weifenluo.winformsUI form - winforms

I have an application that uses Weifenluo.WinformsUI.Docking. One panel, with the navigation menu in it, is initially displayed and is pinned. Pinned seems to be the default state.
My client would like the menu to be unpinned to give them more usable working area on-screen.
How can it be programmatically unpinned?

Related

How to open modal wpf window scoped to a tab item

I have a use case where we have an application with a tabcontrol with 2 or more tab items . I want to be able to open a modal Window (using Window.showDialogue()) so the user is blocked to do any thing else within the active tab item from where the modal window was opened . But should be able to click on other tab item and continue to do the work .
Currently Window.showDialogue() completely blocks all user interactions until the window is closed . Is it possible to change the scope of the blocking window to just the initiating tab item ?
As an alternative , I have a overlay design to show the popup content using the Panel.Zindex and then disable the underlying controls container . But I would prefer to do the simple way of window.showdialogue().
Any help would be appreciated.
As far as I know, here is no way to block only part of a Window when calling ShowDialog. The blocking is done at the Window level by the OS. You'll have to manually disable that tab.
Be aware that if you simply put another element on top of the tab to obscure it, the user may still be able to access the controls below by using the Tab key. You might need to set IsEnabled to false, or maybe IsHitTestVisible, depending on the how you want the application to behave.

Create button in C# winform like IDM buttons

Did you see the first page of IDM (Internet Download Manager)??
IDM first form
Now i'm trying to build some buttons like these buttons(above picture) but I don't know how I must start? Is there any software for it? These buttons change their mode when hover mouse on them.
Have nice day
Start with a ToolStrip control and add a Button to it using the DropDown control on it. Change the DisplayStyle to ImageAndText, and TextImageRelation to ImageAboveText. Now change the Image property to your Icon image, and ImageScaling to None.
On the ToolStrip itself, change GripStyle to Hidden.

WPF: Adorner + Popup = Modal Popup

So here's the idea of it...
I have an application that I am designing with WPF. It has a Main Window with a frame inside to navigate through pages. The navigation aspect is done through the window (kind of like a template with a footer that has the navigation controls) and the pages have the individual content. On certain pages I would like to have an ADD (+) button that causes a popup that has a form inside to add personal information to the database (First name, last name, address, .etc) While this popup is open I would not like them to be able to access any other part of the application until they press OK or CANCEL. I'd like to be able to call this popup from the individual pages unless there is another workaround.
Any ideas or assistance would be appreciated!
some wpf popups Here and Here.

Customizing Navigation Buttons' Bar in MS Access Form

I am creating a form in MS Access. My form appears to the user in form of a modal pop-up box. At the bottom of the form we get Navigation Buttons, New Entry (which I have disabled), Filter and Search Options.
I want to customize this Navigation Button Bar. For example, I do not want 'Record' word to appear at the left most position in this bar.
I have been searching ways to do the same. I am not sure if the same can be achieved, but still hopeful.
Thanks in anticipation.
Jay
You can disable Navigation Buttons in form properties, which means the bar does not appear and in Access 2007 and 2010, you can set the Navigation Caption, which means you can have something instead of "Record", but you cannot customize the bar itself.
If you must have custom navigation, disable the bar and add your own navigation options.
You can change the Record into something else, but not customize the other bits of the navigation bar as far as I know.
Will show as:
If you want to go further than that, you may be able to intercept windows messages and change the wording on the fly, but that would complex and certainly a lot of work for not much.
On the other hand you could simply not show the navigation bar and create your own navigation using buttons and a bit of VBA instead.

Show NotifyIcon Context Menu and Control Its Position?

I'm trying to show a context menu when I left-click a NotifyIcon. Just calling NotifyIcon.ContextMenuStrip.Show() doesn't work very well. A solution has been posted here before that calls a secret method using Reflection:
Dim mi As System.Reflection.MethodInfo = GetType(NotifyIcon).GetMethod("ShowContextMenu", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
mi.Invoke(Icon, Nothing)
This works great, except that I also need to control where the menu is shown. I want to wait for the SystemInformation.DoubleClickTime to elapse between receiving the NotifyIcon.MouseUp event and displaying the menu, so that I can handle single-clicks and double-clicks separately. But invoking the ShowContextMenu method displays the menu at the current mouse position when ShowContextMenu is called, not when the icon was actually clicked. Which means that if the mouse moved during the DoubleClickTime, the menu will be displayed in a different part of the screen. So if I can control where the menu is shown, I can just save the mouse coordinates when I receive the MouseUp event, and then I can ensure that the menu is displayed near the icon. Is there a way to do this?
Thanks in advance.
Well, I just discovered that there are existing programs that exhibit this same behavior. I just went through all the icons in my system tray and about half of them do it. If you left-click the icon and then move the mouse during the delay before the menu appears, the menu will appear at the last mouse location, wherever that is on the screen. Snagit is one application that does this. Outlook is the only program in my tray that always shows the menu where I clicked the icon. But Snagit looks like it's using a .NET ContextMenuStrip, while Outlook is probably using a native menu.
So either this is standard behavior, or it's a problem that no one else has been able to solve either. And as a user, I've never noticed this behavior until yesterday when I was testing my own application. So I guess it's not that big of a deal and I won't worry about it.

Resources