美文网首页
NET WPF要点记录

NET WPF要点记录

作者: AC编程 | 来源:发表于2024-02-21 08:54 被阅读0次

一、缩写

<Application x:Class="wpf_demo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:wpf_demo"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
         
    </Application.Resources>
</Application>
  • ns:namespace
  • clr:Common Language Runtime

二、WPF在哪里可以看到Console.WriteLine的输出值

在WPF中,默认情况下,Console.WriteLine输出的内容无法直接在应用程序界面中看到。因为WPF应用程序是基于窗口的图形界面应用程序,而Console.WriteLine是输出到控制台窗口的。

如果你想在WPF应用程序中看到Console.WriteLine的输出值,可以使用其他方法替代Console.WriteLine,例如使用Debug.WriteLine。这样输出的内容会显示在Visual Studio的输出窗口中。

 void openAction(object sender, RoutedEventArgs e)
 {
     Debug.WriteLine("AlanChen.................");
 }

以调试模式运行

调试模式

相关文章

网友评论

      本文标题:NET WPF要点记录

      本文链接:https://www.haomeiwen.com/subject/fltvadtx.html