wpf - 启动非常慢! [英] wpf - very slow startup!
本文介绍了wpf - 启动非常慢!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚开始构建我的应用程序它几乎没有代码我刚开始设计它已经挂起像狗屎。
< Window X:类= QUOT; Hotel_Reservation_Application.MainWindow"
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x =" http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d =" http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local =" clr-namespace:Hotel_Reservation_Application"
mc:Ignorable =" d"
Title ="酒店预订申请表"高度= QUOT; 570"宽度= QUOT; 830"了minHeight = QUOT; 570" MinWidth = QUOT; 830">
< Canvas x:Name =" MainCanvas" >
< DockPanel x:Name =" MainDockPanel"高度= QUOT; 539" LastChildFill = QUOT假QUOT;宽度= QUOT; 822" RenderTransformOrigin = QUOT; 0.567,0.628">
< Canvas x:Name =" BelowDock"高度= QUOT; 80 QUOT;背景= QUOT;#DDDDDD" DockPanel.Dock = QUOT;底座" />
< Image x:Name =" BackImage"高度= QUOT; 459" VerticalAlignment = QUOT;陀螺"宽度= QUOT; 824"源= QUOT;架构 - 蓝 - 水建筑物-261102.jpg"伸展= QUOT;填写" />
< / DockPanel>
< Canvas x:Name =" ControlCanvas"背景= QUOT;#444444"高度= QUOT; 183"宽度= QUOT; 707" Canvas.Left = QUOT; 115" Canvas.Top = QUOT; 227" RenderTransformOrigin = QUOT; 0.48,0.54"不透明度= QUOT; 0.88">
< / Canvas>
< Canvas x:Name =" UsernameCanvas"背景= QUOT;#686868"高度= QUOT; 61"宽度= QUOT; 323" Canvas.Left = QUOT; 499" Canvas.Top = QUOT; 57" RenderTransformOrigin = QUOT; 0.48,0.54"不透明度= QUOT; 0.9" />
< / Canvas>
< / Window>
使用System;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.Threading.Tasks;使用System.Windows
;使用System.Windows.Controls
;
使用System.Windows.Data;
使用System.Windows.Documents;
使用System.Windows.Input;
使用System.Windows.Media;
使用System.Windows.Media.Imaging;使用System.Windows.Navigation
;
使用System.Windows.Shapes;
名称空间Hotel_Reservation_Application
{
///< summary>
/// MainWindow.xaml的交互逻辑
///< / summary>
public partial class MainWindow:Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
我的代码或其他什么问题否?
解决方案
尝试过并且没有时间问题。 唯一的区别是我没有 图像。
i have only started to build my application it almost has no code i've just started designing it already hangs like shit.
<Window x:Class="Hotel_Reservation_Application.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Hotel_Reservation_Application" mc:Ignorable="d" Title="Hotel Reservation Application" Height="570" Width="830" MinHeight="570" MinWidth="830"> <Canvas x:Name="MainCanvas" > <DockPanel x:Name="MainDockPanel" Height="539" LastChildFill="False" Width="822" RenderTransformOrigin="0.567,0.628"> <Canvas x:Name="BelowDock" Height="80" Background="#dddddd" DockPanel.Dock="Bottom"/> <Image x:Name="BackImage" Height="459" VerticalAlignment="Top" Width="824" Source="architecture-blue-water-buildings-261102.jpg" Stretch="Fill"/> </DockPanel> <Canvas x:Name="ControlCanvas" Background="#444444" Height="183" Width="707" Canvas.Left="115" Canvas.Top="227" RenderTransformOrigin="0.48,0.54" Opacity="0.88"> </Canvas> <Canvas x:Name="UsernameCanvas" Background="#686868" Height="61" Width="323" Canvas.Left="499" Canvas.Top="57" RenderTransformOrigin="0.48,0.54" Opacity="0.9"/> </Canvas> </Window>
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Hotel_Reservation_Application { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } } }
is there some problem with my code or something else?
解决方案
Tried it and have no time problem. The only difference is that I do not have the Image.
这篇关于wpf - 启动非常慢!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文