From: http://www.cnblogs.com/yvesliao/archive/2008/08/26/1276609.html
1. When you double-click a tab, the current tab is directly separated from the frame of the main form to form a floating form. This is not what I want. I changed it to double-click to close it.In the wndproc method of dockpanestripbase. CS, the left-click message is re-processed (the comment below is the original method, and the line below is changed ):
[Securitypermission (securityaction. linkdemand, flags = securitypermissio
Recently, a winform project has to be implemented. The layout should be like the following.
However, there is a problem, that is, to determine whether the window has been opened, read some of the onlineCode, Such:
Private
Void
Shownewform (
Object
Sender, eventargs E){
If
(Finddocument (
"
Baseform
"
)
=
Null
){Baseform childform
=
New
Baseform ();Childform. Show (dockpanel1 );}
Else
{Form F
=
Finddocument (
"
Baseform
"
)
As
Form;
How to customize the form attributes when double-clicking a form float
A common problem that has not been solved for a long time is harmless. Finally, I thought about how to get it at the constant urging of my colleagues. To put it bluntly,
Weifenluo. winformsui. Docking, a good open-source control,
It is a very good open-source control, which has never been used before. It is as powerful and beautiful as a commercial control. It is also relatively simple to use controls. So direct
Because the project to use a dockable, floating form, found on the internet, there is really such a component, and is open source, download found very useful. Although on the internet has been on this aspect of the article, but in order to
crazy, and the Start menu is full. If you are interested, you can check out mobiform. The above link is provided. To be honest, this company is not doing anything very well, and there are a lot of bugs.
Dockpanel
Xmlns
= "Http://schemas.microsoft.com/2003/xaml"
>
Border
Background
= "Lightblue"
Dockpanel. Dock
= "TOP"
>
Text
>
Some text
Text
>
Border
In WPF, panel is used for page layout. Panel is an abstract class and serves as the base class of all panel controls. Panel does not inherit from the control class, but directly inherits from frameworkelement. View the inheritance relationship of panel:
Panel has the following Derived classes: canvas, dockpanel, grid, stackpanel, virtualizingstackpanel, and wrappanel. The panel controls are described as follows:
I. Canvas
In the canvas area, specify
This article supporting source code
Hello everyone! Today we are going to start with the fifth lesson of this series of courses, which will lead us to work together to achieve the functions of questionnaire, questionnaire, questionnaire and questionnaire management.
First of all, in order to make our interface more convenient to operate and layout, we introduce the third source control dockpanel[of course can not introduce the control and direct dev
UIControl usage, comparison,DockpanelIt can better meet the requirements of the Auxiliary Design Software of the diversion and Interception Scheme.
Figure 7.1-1DockpanelUser Interface for testing
Dockpanel suiteIs a very good, very matureWinform UIControls, many open-sourceWinformThe project uses this control, for example:Sharpdevelop. PassDockpanel suiteYou can easily implement ImagesVisual Studio MSWindow positioning, floating,Dock,TabAnd other in
Cool effect. It is worth learning.
Reset toolbox:
Create a new winform program named testdockpanelcontrol. Select the form1 form and select the Toolbox ---> New add tab named weifenluo ---> right-click ---> select item ---> browse ---
> Weifenluo. winformsui. Docking. dll ---> OK. The dockpanel control is displayed in the toolbox. The preceding steps only add the dockpanel control to the toolbox.
Next, let'
Cool effect, it is worthwhile to learn well ha.To reset the Toolbox:Create a new WinForm program with the project name Testdockpanelcontrol. Select the Form1 form after selecting the toolbox--->> new add tab named Weifenluo--->> right--->> select--->> browse--->>weifenluo.winformsui.docking.dll--->> OK. The DockPanel control appears in the toolbox at this time. The above steps simply add the DockPanel contr
Inherit contentcontrol to easily implement controls containing content. solution 1:
Custom Controls
Code As follows:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Public
Class
Dockpanel: contentcontrol{
Public
Dockpanel (){
This
. Defaultstylekey
=
Typeof
(Dockpanel );}} The code
Quickstart3
This sample shows you how to construct a complex eXtensible Application Markup Language (XAML) layout by nesting textblock, button, and dockpanels within a parent dockpanel.
This example demonstrates any embedded control in the control, as shown below:
The XAML documentation is as follows: PageXmlns = " Http://schemas.microsoft.com/winfx/2006/xaml/presentation " Xmlns: x = " Http://schemas.microsoft.com/winfx/2006/xaml " >
There are several classes available in the control DockPanel, two are important, one is DockPanel, the other is dockcontent, DockPanel dockcontent is inherited from the form class and is used to provide a floating window base class. That is to say: The Dockcontent object can be arbitrarily welt in the DockPanel obje
The layout elements of WPF are as follows:
Grid: Grid. You can customize rows and columns and adjust the layout of the control by the number of columns, row height, and column width.
StackPanel: Format panel. You can arrange the elements in the horizontal or vertical direction into a line.
Canvas: Canvas. Controls placed on the canvas are located with absolute coordinates.
DockPanel: Parking panel. You can select the direction of the interna
The relationship between the WPF layout control and the HorizontalAlignment/verticalignment attribute of the Child control,
The relationship between the WPF layout control and the HorizontalAlignment/verticalignment attribute of the Child control:
1. Canvas/WrapPanel control:
The HorizontalAlignment/verticalignment attribute of its child control is invalid.2. Grid Control:
The HorizontalAlignment/verticalignment attribute of its child control is valid.3. StackPanel control:
A. When its Orientati
In WPF, how does one jump out of the tab loop from the toolbar? Zhou yinhui
In WPF. When the tab key is used continuously in the toolbar, it will loop with it. You can run the following Code And found the problem: Window Xmlns = "Http://schemas.microsoft.com/winfx/2006/xaml/presentation" Xmlns: SYS = "CLR-namespace: system; Assembly = mscorlib" Xmlns: x = "Http://schemas.microsoft.com/winfx/2006/xaml" > Dockpanel > Toolbar
Weifenluo. winformsui. dockcontent is a good control, which can easily implement the window positioning, floating, dock, tab and other Interface Effects in vs 2003, but the specific usage is still unclear, who knows the usage details!
××××××××××××××××××××××××××××××××××××××××××× ××××
Dockpanel provides several available classes, two of which are important: dockpanel and dockcontent,
) window1.xaml. CS background classProvides the internal set names and nicknames types.In the constructor, initialize and bind the button_click event, instantiate the names variable, and finally bind the names to the dockpanel control at the front end:Dockpanel. datacontext = This. names;Setting the datacontext attribute is critical and feels similar to binding in the past.Each time a button is pressed, the same data NICK: name will be added to the na
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.