fix: memory leak of some controls. (#1482)
This commit is contained in:
1 parent
a447ac3e75
commit
9092fe6ec7
4 files changed
+40
-3
No files matched your search
@@ -8,7 +8,7 @@
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32">
|
||||
<hc:ImageViewer Background="{DynamicResource SecondaryRegionBrush}" MaxWidth="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
|
||||
<hc:ImageViewer x:Name="ImageViewerDemo" Background="{DynamicResource SecondaryRegionBrush}" MaxWidth="600" Height="330" ImageSource="/HandyControlDemo;component/Resources/Img/1.jpg"/>
|
||||
<Button Margin="0,32,0,0" Command="{Binding OpenImgCmd}" Content="{ex:Lang Key={x:Static langs:LangKeys.OpenImageBrowser}}" Style="{StaticResource ButtonPrimary}" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class ImageBrowserDemoCtl
|
||||
public partial class ImageBrowserDemoCtl : IDisposable
|
||||
{
|
||||
public ImageBrowserDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ImageViewerDemo.Dispose();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user