0

When clicking on image brush in code, Visual Studio freezes and crashes. Here is the code that worked but at one point it stopped working:

<ListBox x:Name="messageList" Grid.Column="1" Grid.ColumnSpan="2" Grid.RowSpan="4">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Margin="5" Orientation="Horizontal" Height="50">
                <Ellipse Height="50" Width="50" HorizontalAlignment="Left">
                    <Ellipse.Fill>
                        <ImageBrush Stretch="UniformToFill" ImageSource="{Binding Path=ImgPath}"/>
                    </Ellipse.Fill>
                </Ellipse>
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="{Binding Path=DateofMessage}" FontSize="14"/>
                    <TextBlock Text="{Binding Path=Content}" FontSize="14" VerticalAlignment="Center"/>
                </StackPanel>
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

I tried to read the logs, there was something about the memory, I cleaned up the disk space, add a few gigabytes, it helped, but when I tried to change the code again, the problem returned.

Mustafa Özçetin
  • 1,893
  • 1
  • 14
  • 16
daMpik
  • 13
  • 5
  • How does the memory usage of Visual Studio look? – Wahlstrommm Apr 30 '23 at 21:47
  • 5%, but windows error report 15 percent – daMpik Apr 30 '23 at 21:52
  • 1
    Try restarting the solution. If didnt help try deleting .suo file for the solution. At last check your installed extensions, maybe some of them are causing harm or something – ikhtiyarnovruzov May 01 '23 at 10:00
  • Thank you very much, it helped, but, I did not find .suo, by analogy, I deleted the .vs folder and everything worked. What could be wrong? – daMpik May 01 '23 at 14:27
  • Glad I could help. .suo is often located under `[solution]/.vs/[project]/[vs_version]/.suo`. A potential cause could be a disrupted .suo file, VS overloading etc. – ikhtiyarnovruzov May 02 '23 at 04:05

0 Answers0