我对VS2015中XAML Designer的默认缩放感到非常恼火(不确定版本是否相关),这是Fit all默认情况下.
有没有办法将其设置为100%默认值?禁用缩放功能也是一种选择.但有没有在VS相关Settings- XAML Designer.
PS:用语言标记它,以便像我这样的人看到,他们只看标记的问题(在我的情况下C#).
在Visual Studio 2012中从代码文件切换到XAML文件时,重点放在设计器上.如果我想编辑XAML(99%的时间),我需要使用鼠标将焦点移动到XAML代码/标记窗口.有没有办法在没有鼠标的情况下将焦点移动到XAML?
注意:在SO中也有类似的问题,但它们涉及在代码背后和XAML设计器之间移动.
问题是如果此过程不存在,则构建失败.我试着写这样的东西
tasklist /nh /fi "imagename eq XDesProc.exe" | find /i "XDesProc.exe" && (
TASKKILL /F /IM "XDesProc.exe"
) || (
echo XAML designer is not running
)
Run Code Online (Sandbox Code Playgroud)
但是如果XDesProc.exe没有运行,ERRORLEVEL也等于1并且bild失败.
command-line prebuild kill-process visual-studio xaml-designer
我是WPF的新手,我正在尝试解决错误.我正在尝试构建一个自定义控件库,我可以在其中创建自己的控件对象.当我转到文件>新建项目> WPF自定义控件库> [输入名称]>保存,然后即时错误:
The name "CustomControl1" does not exist in the namespace "clr-namespace:ProjectName"
Run Code Online (Sandbox Code Playgroud)
我没有编辑任何代码,但立即出错.作为参考,错误在Generic.xaml中.
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ProjectName">
<Style TargetType="{x:Type local:CustomControl1}"> //<--Fails here
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CustomControl1}"> // Fails here as well
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Run Code Online (Sandbox Code Playgroud)
我正在使用Visual Studio 12和.NET 4.任何想法?
wpf intellisense visual-studio xaml-designer visual-studio-2012
我对此感到有些沮丧,也许有人遇到了类似的问题或者想知道如何修复它.
我升级到Windows 10.
我安装了Visual Studio 2015社区.
我创建了一个新的解决方案,只有一个项目用于空白的通用Windows应用程序.我正在使用C#.
问题:
我试图在设计器中打开MainPage.xaml,但设计器不会加载.我NullReferenceException在设计师窗口中得到了一个.我尝试在Blend中打开它,结果相同.正如Visual Studio建议的那样,我尝试关闭"选项"菜单中的"在XAML Designer中运行项目代码"功能,但它没有帮助.
在设计器中打开其他xaml文件没有问题(WPF,Windows Phone 8或8.1 Universal应用程序都可以正常工作).该应用程序在本地计算机上运行,在模拟器中,只有设计师才能执行.
欢迎任何建议.
编辑
设计师窗口的例外情况:
System.NullReferenceException
Object reference not set to an instance of an object.
at Microsoft.VisualStudio.DesignTools.Platform.Metadata.MetadataStore.GetTypeConverter(Type type)
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsUIXamlDesignTimeProperties.ResolveImplementation(IPlatformMetadata platformMetadata, DesignTimePropertyId neutralProperty, IType declaringType, PropertyChangedCallback callback)
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsUIXamlDesignTimeProperties.RegisterProperty(IPropertyId neutralPropertyKey, IType declaringType, PropertyChangedCallback callback)
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsUIXamlCommonDesignTimeProperties.Initialize(WindowsUIXamlDesignTimeProperties designTimeProperties)
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsUIXamlDesignTimeProperties..ctor(IPlatformTypes platformMetadata)
at Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.UniversalXamlPlatformMetadata.CreateDesignTimeProperties()
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.Metadata.WindowsUIXamlPlatformMetadata.Initialize()
at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsStoreXamlPlatform.Initialize()
at Microsoft.VisualStudio.DesignTools.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver referenceAssemblyResolver)
at Microsoft.VisualStudio.DesignTools.Designer.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
at Microsoft.VisualStudio.DesignTools.Designer.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, …Run Code Online (Sandbox Code Playgroud) 每当我在XAML页面打开时运行我的Windows Phone应用程序时,Visual Studio会将以下内容添加到我的XAML中:
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="768"
d:DesignWidth="480"
Run Code Online (Sandbox Code Playgroud)
我怎么能阻止它这样做?我知道保留它不会伤害我,但除非我需要它,否则我不希望它出现在我的代码中.
谢谢
目前,当我遇到问题(如错误和警告,已解决但仍存在于ErrorList中或重新加载设计器使用的程序集)与Visual Studio 2012中的XAML-Designer时,我需要重新启动它,我打开ProcessExplorer并杀死XDesProc.exe正在运行的Visual Studio 2012实例的子进程.这导致Visual Studio 2012显示Unhandled Exception Designer process terminated unexpectedly!并为我提供重新加载设计器的选项.
在Visual Studio 2012中是否有更好的或内置的方式来重新启动设计器.重新打开XAML文件通常无助于解决问题.
我知道存在类似的问题,但他们没有解决这个问题.
我遇到了Visual Studio 2008 SP1的问题,只要xaml编辑获得焦点,它就会挂起4-10秒.这实际上让我感到绝望,我即将回到Winforms.注意 - 只需编辑直接向上的xaml(即没有启用设计器)不能解决问题.
我做了以下事情:
设置:Windows XP64 8核心Zeon,16Gb RAM
我有以下情况.我昨晚安装了Visual Studio Update 3.现在我有一个问题,当我打开我的项目(通用应用程序),我已经完成更新2时,我的设计师将无法加载,它会抛出异常:

有谁知道如何解决这个问题?我想这不是一个错误,因为可能一切都是由微软测试的,这不是RC更新.如果我没有找到解决方案,我即将删除此更新.我猜它可能与xaml有关,如果有任何改变?
xaml xaml-designer visual-studio-2013 windows-phone-8.1 win-universal-app
我在创建一个空白的Windows 10 Universal Application时遇到以下System.Runtime.Remoting.RemotingException错误...
我已在网上查询其他解决方案,并已完成以下操作......
如果您能找到上述解决方案,请告诉我
xaml windows-applications xaml-designer win-universal-app visual-studio-2015
xaml-designer ×10
xaml ×4
c# ×3
wpf ×3
.net ×1
command-line ×1
designer ×1
intellisense ×1
kill-process ×1
prebuild ×1
restart ×1
vb.net ×1