Devexpress 12.2.8.0 部分学习笔记1 【Docking and Popups】
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="docking_test2.aspx.cs" Inherits="startest.docking_test2" %> 2 3 <!DOCTYPE html> 4 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6 <head runat="server"> 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 8 <title></title> 9 </head> 10 <body> 11 <form id="form1" runat="server"> 12 <div> 13 14 <dx:ASPxDockManager ID="ASPxDockManager1" runat="server"> 15 </dx:ASPxDockManager> 16 <dx:ASPxDockZone ID="ASPxDockZone1" runat="server" Height="369px" Width="243px"> 17 <Styles> 18 <DockingForbiddenStyle BackColor="#FF9900"> 19 </DockingForbiddenStyle> 20 </Styles> 21 </dx:ASPxDockZone> 22 <%-- 面板一,ownerzoneuid就是该面板属于哪个停靠区域,而下面的forbiddenzoneitem的意思就是不能停靠在uid等于zoneuid的停靠区域中--%> 23 <dx:ASPxDockPanel ID="ASPxDockPanel1" runat="server" Text="面板一" PanelUID="面板一" Height="128px" OwnerZoneUID="ASPxDockZone1" > 24 <ForbiddenZones> 25 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone2" /> 26 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone3" /> 27 </ForbiddenZones> 28 <ContentCollection> 29 <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True"></dx:PopupControlContentControl> 30 </ContentCollection> 31 </dx:ASPxDockPanel> 32 <dx:ASPxDockPanel ID="ASPxDockPanel2" runat="server" Text="面板二" PanelUID="面板二" Height="153px" OwnerZoneUID="ASPxDockZone2"> 33 <ForbiddenZones> 34 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone1" /> 35 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone3" /> 36 </ForbiddenZones> 37 <ContentCollection> 38 <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True"></dx:PopupControlContentControl> 39 </ContentCollection> 40 </dx:ASPxDockPanel> 41 <dx:ASPxDockPanel ID="ASPxDockPanel3" runat="server" Text="面板三" PanelUID="面板三" Height="202px" OwnerZoneUID="ASPxDockZone3" Width="363px"> 42 <ForbiddenZones> 43 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone1" /> 44 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone2" /> 45 </ForbiddenZones> 46 <ContentCollection> 47 <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True"></dx:PopupControlContentControl> 48 </ContentCollection> 49 </dx:ASPxDockPanel> 50 <dx:ASPxDockPanel ID="ASPxDockPanel4" runat="server" Text="面板四" PanelUID="面板四" Height="165px" OwnerZoneUID="ASPxDockZone1" Width="508px"> 51 52 <ContentCollection> 53 <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True"></dx:PopupControlContentControl> 54 </ContentCollection> 55 56 </dx:ASPxDockPanel> 57 <dx:ASPxDockPanel ID="ASPxDockPanel5" runat="server" Text="面板5" PanelUID="面板五" Height="214px" OwnerZoneUID="ASPxDockZone2" Width="289px"> 58 <ForbiddenZones> 59 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone1" /> 60 <dx:ForbiddenZoneItem ZoneUID="ASPxDockZone3" /> 61 </ForbiddenZones> 62 <ContentCollection> 63 <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True"></dx:PopupControlContentControl> 64 </ContentCollection> 65 </dx:ASPxDockPanel> 66 <dx:ASPxDockZone ID="ASPxDockZone2" runat="server" Height="237px" Width="398px"> 67 <Styles> 68 <DockingForbiddenStyle BackColor="#FF9900"> 69 </DockingForbiddenStyle> 70 </Styles> 71 </dx:ASPxDockZone> 72 <br /> 73 <dx:ASPxDockZone ID="ASPxDockZone3" runat="server" Height="177px" Width="308px"> 74 <Styles> 75 <DockingForbiddenStyle BackColor="#FF9900"> 76 </DockingForbiddenStyle> 77 </Styles> 78 </dx:ASPxDockZone> 79 <br /> 80 81 </div> 82 </form> 83 </body> 84 </html>
html代码
【docking】
主要有两个空间 :
ASPxDockPanel:面板,就是可以移动的那个
OwnerZoneUID:从属于那个zone,加载出来就停留在那个zone里面
<dx:ForbiddenZoneItem ZoneUID="ASPxDockZone1" />禁止停留在zone1上面
ASPxDockZone:“禁区”,
【loading panl 加载面板】
【popup control 弹出空间】
1 <td class="auto-style4"> 2 3 4 <asp:Button ID="Button1" runat="server" Text="open popup" OnClientClick="popup.Show();return false;" /> 5 <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" ClientInstanceName ="popup" AllowDragging="True" AllowResize="True" DragElement="Window"> 6 <Controls> 7 <asp:Button ID="Button2" runat="server" Text="hide popup" OnClientClick ="popup.Hide();return false;" /> 8 </Controls> 9 </dx:ASPxPopupControl> 10 <br /> 11 12 13 </td>
年轻过得闲,以后被人嫌...
年轻累不死....