We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GifImage控件Dispose 后设置visible 引发 GdiplusInvalidParameter 异常
Environment
XAML:
<StackPanel Margin="10"> <hc:GifImage x:Name="GifImage" Width="500" Height="300" Margin="10"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <Button Height="50" Width="100" HorizontalAlignment="Center" Content="Load" Click="Button_Click"/> <Button Height="50" Width="100" HorizontalAlignment="Center" Content="Dispose" Click="Button_Click_1"/> <Button Height="50" Width="100" HorizontalAlignment="Center" Content="Hidden" Click="Button_Click_2"/> <Button Height="50" Width="100" HorizontalAlignment="Center" Content="Visible" Click="Button_Click_3"/> </StackPanel> </StackPanel>
CS:
string gifpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.gif"); private void Button_Click(object sender, RoutedEventArgs e) { GifImage.Uri = new Uri($"pack://siteoforigin:,,,/{gifpath}"); } private void Button_Click_1(object sender, RoutedEventArgs e) { GifImage.Dispose(); } private void Button_Click_2(object sender, RoutedEventArgs e) { GifImage.Visibility = Visibility.Hidden; } private void Button_Click_3(object sender, RoutedEventArgs e) { //GifImage.Uri = new Uri(GifImage.Uri.OriginalString); GifImage.Visibility = Visibility.Visible; }
The text was updated successfully, but these errors were encountered:
ebcb709
我也遇到了这个问题怎么解决?3.4版本
Sorry, something went wrong.
我也遇到这个问题了 ,3.4版本。这样启动的时候直接报错了 <hc:GifImage x:Name="GifImageMain" Stretch="None" Margin="5" Uri="/2.gif" />
<hc:GifImage x:Name="GifImageMain" Stretch="None" Margin="5" Uri="/2.gif" />
No branches or pull requests
GifImage控件Dispose 后设置visible 引发 GdiplusInvalidParameter 异常
Environment
XAML:
CS:
The text was updated successfully, but these errors were encountered: