Visual Studio社区2019在特定光标位置停止响应 [英] Visual Studio Community 2019 Stops Responding At Specific Cursor Position

查看:148
本文介绍了Visual Studio社区2019在特定光标位置停止响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XAML文件(对于UserControl),当光标移动到特定位置时,Visual Studio社区停止响应。以下是代码:

I have a XAML file (for a UserControl) in which Visual Studio Community stops responding when the cursor is moved to a specific position. Here is the code:

<UserControl
	x:Class="AboutTime_Experimental.VerticalPicker"
	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:wct="using:Microsoft.Toolkit.Uwp.UI.Controls"
	mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="100">

	<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
		<Grid.RowDefinitions><RowDefinition Height="Auto"/></Grid.RowDefinitions>
		<Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
		<wct:Carousel>
			<wct:Carousel.Style>
				<Style TargetType="wct:Carousel">
					<Setter Property="SelectedIndex" Value="0"/>
					<Setter Property="Margin" Value="0"/>
					<Setter Property="Padding" Value="0"/>
					<Setter Property="HorizontalAlignment" Value="Center"/>
					<Setter Property="VerticalAlignment" Value="Center"/>
					<Setter Property="Orientation" Value="Vertical"/>
					<Setter Property="ItemTemplate"><Setter.Value><DataTemplate><Border Width="75" Height="75" Background="RoyalBlue" BorderThickness="1"><TextBlock Text="{Binding}" FontFamily="Arial" FontSize="48" Foreground="Black" OpticalMarginAlignment="TrimSideBearings" TextAlignment="Center" TextLineBounds="Tight" VerticalAlignment="Center"/></Border></DataTemplate></Setter.Value></Setter>
					<Setter Property="ItemsPanel"><Setter.Value><ItemsPanelTemplate><wct:CarouselPanel/></ItemsPanelTemplate></Setter.Value></Setter>
				</Style>
			</wct:Carousel.Style>
			<wct:Carousel.Items>
				<x:String>00</x:String>
				<x:String>01</x:String>
				<x:String>02</x:String>
				<x:String>03</x:String>
				<x:String>04</x:String>
				<x:String>05</x:String>
				<x:String>06</x:String>
				<x:String>07</x:String>
				<x:String>08</x:String>
				<x:String>09</x:String>
				<x:String>10</x:String>
				<x:String>11</x:String>
				<x:String>12</x:String>
				<x:String>13</x:String>
				<x:String>14</x:String>
				<x:String>15</x:String>
				<x:String>16</x:String>
				<x:String>17</x:String>
				<x:String>18</x:String>
				<x:String>19</x:String>
				<x:String>20</x:String>
				<x:String>21</x:String>
				<x:String>22</x:String>
				<x:String>23</x:String>
				<x:String>24</x:String>
			</wct:Carousel.Items>
		</wct:Carousel>
		<ContentControl>
			<ContentControl.Style>
				<Style TargetType="ContentControl">
					<Setter Property="Margin" Value="0"/>
					<Setter Property="Padding" Value="0"/>
					<Setter Property="HorizontalAlignment" Value="Center"/>
					<Setter Property="VerticalAlignment" Value="Center"/>
					<Setter Property="ContentTemplate"><Setter.Value><DataTemplate><Border  Width="75" Height="75" Background="RoyalBlue" BorderThickness="1"><TextBlock Text="{Binding}" FontFamily="Arial" FontSize="48" Foreground="Black" OpticalMarginAlignment="TrimSideBearings" TextAlignment="Center" TextLineBounds="Tight" VerticalAlignment="Center"/></Border></DataTemplate></Setter.Value></Setter>
					<Setter Property="Content" Value="00"/>
				</Style>
			</ContentControl.Style>
		</ContentControl>
	</Grid>
</UserControl>


当光标移动到边框标记(第22行的"<"字符之后的任何地方)时,Visual Studio社区2019停止响应,但它直到那一点才停止响应(如果光标只移动到
的Setter,Setter.Value或DataTemplate标签,它就不会停止响应。(几乎)相同的代码也很有趣第61行不会导致此问题。使用键盘或鼠标移动光标时会出现此问题。为什么Visual Studio Community 2019
拒绝让我将光标放在此位置?我使用的是Visual Studio Community 2019版本16.1.0。谢谢。



Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

Visual Studio Community 2019 stops responding when the cursor is moved into the Border tag (anywhere past the "<" character) on line 22, but it does not stop responding until that point (it does not stop responding if the cursor is only moved to the Setter, Setter.Value, or DataTemplate tags. It is also very interesting that the (almost) identical code on line 61 does not cause this problem. This problem happens when moving the cursor using the keyboard or mouse. Why does Visual Studio Community 2019 refuse to let me place the cursor at this position? I am using Visual Studio Community 2019 Version 16.1.0. Thanks.


Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

推荐答案

Nathan Sokalski,

Hi Nathan Sokalski,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

根据您的描述,似乎在visual studio中运行了一些组件。请
赢+ R>>输入命令:  Devenv.exe / SafeMode ,要在安全模式下运行visual studio,它将禁用第三方插件。 

According to your description, it seems that there is some components running in visual studio. Please Win+R >> type the command: Devenv.exe /SafeMode, to run visual studio in safe mode, it will disable 3rd party plugins. 

如果此问题仍然存在,我们建议您打开安装程序来修复visual studio。

If this issue persists, we suggest you could open installer to repair visual studio.

预计会有任何反馈。

最好的问候,

Dylan





这篇关于Visual Studio社区2019在特定光标位置停止响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆