mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
108 lines
2.7 KiB
Plaintext
108 lines
2.7 KiB
Plaintext
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
|
|
<UIX
|
|
xmlns="http://schemas.microsoft.com/2007/uix"
|
|
xmlns:iris="assembly://UIX/Microsoft.Iris"
|
|
xmlns:zune="assembly://ZuneShell/ZuneUI"
|
|
xmlns:popup="res://ZuneShellResources!Popup.uix"
|
|
xmlns:dialog="res://ZuneShellResources!Dialog.uix"
|
|
>
|
|
|
|
|
|
|
|
|
|
<UI Name="PopupLayer">
|
|
<Properties>
|
|
<Command Name="MouseDownCommand"/>
|
|
|
|
|
|
<Boolean Name="IsModal"/>
|
|
</Properties>
|
|
|
|
<Input>
|
|
|
|
<ClickHandler Name="Clicker" ClickType="LeftMouse,RightMouse" Enabled="false"/>
|
|
</Input>
|
|
|
|
<Locals>
|
|
<zune:PopupManager Name="PopupManager" PopupManager="{zune:PopupManager.Instance}"/>
|
|
<dialog:Dialog Name="CurrentCodeDialog" Dialog="{null}"/>
|
|
</Locals>
|
|
|
|
<Scripts>
|
|
|
|
<Script>
|
|
bool isModal = [PopupManager.IsModal];
|
|
|
|
IsModal = isModal;
|
|
Clicker.Enabled = isModal;
|
|
ModalLayer.Visible = isModal;
|
|
|
|
|
|
UI.KeyInteractive = isModal;
|
|
</Script>
|
|
|
|
|
|
<Script>
|
|
if ([PopupManager.PendingCodeDialogs.Count] > 0 && [CurrentCodeDialog] == null)
|
|
{
|
|
zune:DialogHelper info = (zune:DialogHelper)PopupManager.PendingCodeDialogs.get_Item(0);
|
|
PopupManager.PendingCodeDialogs.RemoveAt(0);
|
|
|
|
CurrentCodeDialog = new dialog:Dialog();
|
|
CurrentCodeDialog.ContentUI = info.ContentUI;
|
|
CurrentCodeDialog.Helper = info;
|
|
CurrentCodeDialog.Helper.Show(CurrentCodeDialog);
|
|
}
|
|
</Script>
|
|
|
|
|
|
<Script>
|
|
if (CurrentCodeDialog != null && ![CurrentCodeDialog.Helper.IsVisible])
|
|
{
|
|
UI.DisposeOwnedObject(CurrentCodeDialog);
|
|
CurrentCodeDialog = null;
|
|
}
|
|
</Script>
|
|
|
|
|
|
<Script>
|
|
[DeclareTrigger(MouseDownCommand.Invoked)]
|
|
|
|
PopupManager.NotifyMouseDown();
|
|
</Script>
|
|
|
|
|
|
<Script>
|
|
if (![iris:Application.Window.Active])
|
|
{
|
|
PopupManager.NotifyWindowDeactivated();
|
|
}
|
|
</Script>
|
|
</Scripts>
|
|
|
|
<Content>
|
|
|
|
<Panel Navigation="ContainAll,WrapAll">
|
|
<Layout>
|
|
<DockLayout DefaultLayoutInput="Client,Fill"/>
|
|
</Layout>
|
|
<Children>
|
|
|
|
<Repeater Layout="Popup" Source="{PopupManager.Popups}">
|
|
<Content>
|
|
<popup:PopupHost
|
|
Popup="{(popup:Popup)(((zune:PopupHelper)RepeatedItem).Popup)}"
|
|
LayoutInput="{((popup:Popup)(((zune:PopupHelper)RepeatedItem).Popup)).LayoutInput}"/>
|
|
</Content>
|
|
</Repeater>
|
|
|
|
<Panel Name="ModalLayer" Visible="true" MouseInteractive="true"/>
|
|
|
|
</Children>
|
|
</Panel>
|
|
|
|
</Content>
|
|
</UI>
|
|
|
|
</UIX>
|