复制代码 代码如下:
public class ModalDialog : UserControl
{
public event EventHandler closed; // Dialog Close Event
public event ModalEventHandler CompletedCallback; // Call back event
public void Close()
{
if (closed != null)
{
closed(this, EventArgs.Empty);
}
}
public void HandleCallback(ModalEventArgs e)
{
if (CompletedCallback != null)
{
CompletedCallback(this, e);
}
}
}
public interface IModalDialogOpener
{
void ShowModalDialog(ModalDialog dialog);
void CloseModalDialog();
}
public class ModalEventArgs : EventArgs
{
public object Result { set; get; } // the result of this modal dialog
}
public delegate void ModalEventHandler(object sender, ModalEventArgs e);
复制代码 代码如下:
<!-- Use for loading modal dialog -->
<Border x:Name="placeHolder" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Visibility="Collapsed"
Background="#ff8a8a8a" Opacity="0.9" Canvas.ZIndex="1000"/>
新闻热点
疑难解答
图片精选