none
Visual Studio Community 2019 Stops Responding At Specific Cursor Position

    Question

  • 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>
    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/

    Thursday, May 23, 2019 9:08 PM

All replies

  • Hi Nathan Sokalski,

    Welcome to MSDN forum.

    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. 

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

    Any feedback will be expected.

    Best Regards,

    Dylan



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 24, 2019 9:49 AM