<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Dialog_Sample._Default" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1Dialog" TagPrefix="wijmo" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        .wijmo-wijdialog
        {
            color: #0088FF;
            background: #9933FF;
            border-color: #000000;
            border-width: thick;
            font-family: Blackadder ITC;
            font-size: large;
        }
    </style>
    <script>
        let isDialogVisible = false;

        function OnClientShown(args) {
            console.log("Dialog Displayed");
            isDialogVisible = true;
        }
        function OnClientHide(args) {
            isDialogVisible = false;
        }
        function isVisible() {
            alert(isDialogVisible ? "Dialog is Visible!" : "Dialog is not Visible!!");
        }
    </script>
    <wijmo:C1Dialog ID="C1Dialog1" runat="server" Position="[120,280]" OnClientOpen="OnClientShown" OnClientClose="OnClientHide" Resizable="false" Draggable="false" ></wijmo:C1Dialog>
    <button type="button" onclick="isVisible(); return false;">Is Dialog Visible</button>

</asp:Content>
