试图让这个例子工作http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspxWPF命名空间问题 - 进程?
但是,我似乎无法得到下面的“过程”的名称空间或语法权限。
<Border x:Name="panelDialog" Visibility="Collapsed">
<Grid>
<Border Background="Black" Opacity="0.49"></Border>
<!--While Xmal Content of the dialog will go here-->
</Grid>
</Border>
博客文章接着说.....
就放了两个函数隐藏和显示该对话框。总代码如下。在波纹管代码中,我显示了一个带灯箱效果的加载屏幕。显示模式对话框时,只需调用显示和隐藏等待屏幕方法。把你的cpu扩展作业发送到后台线程,并在后台线程中使用调度程序来更新用户界面。
<Page x:Class="Home">
<Grid>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<!--All the contents will go here-->
</ScrollViewer>
<Border x:Name="panelLoading" Visibility="Collapsed">
<Grid>
<Border Background="Black" Opacity="0.49"></Border>
<local:TMEWaitScreen></local:TMEWaitScreen>
</Grid>
</Border>
</Grid>
</Page>
这里是代码隐藏
#region About Wait Screen
/// <summary>
/// Show wait screen before a web request
/// </summary>
public void ShowWaitScreen()
{
Process del = new Process(ShowWaitScreenUI);
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, del);
}
private void ShowWaitScreenUI()
{
panelLoading.Visibility = Visibility.Visible;
}
/// <summary>
/// Hide a wait screen after a web request
/// </summary>
public void HideWaitScreen()
{
Process del = new Process(HideWaitScreenUI);
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, del);
}
private void HideWaitScreenUI()
{
panelLoading.Visibility = Visibility.Collapsed;
}
#endregion
我有这个线路具体问题:
Process del = new Process(ShowWaitScreenUI);
我能找到的唯一方法是在System.Diagnostics程序,并采取无参数。是我试图从课外学习的博客文章,还是我只是在错误的地方?