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.