개정판 8a9f6742
issue #670 image load modify
KCOM/Views/MainMenu.xaml | ||
---|---|---|
162 | 162 |
<!--<MarkupToPDF:RectangleControl Height="200" HorizontalAlignment="Center" Name="rectangle2" StrokeColor="Black" VerticalAlignment="Top" Width="00" FillColor="Red"/>--> |
163 | 163 |
</InkCanvas> |
164 | 164 |
<!--강인구 추가--> |
165 |
<Image Panel.ZIndex="0"
|
|
165 |
<Image Panel.ZIndex="0" x:Name="mainPanel"
|
|
166 | 166 |
Source="{Binding ImageViewPath, Source={x:Static common:ViewerDataModel.Instance}}" |
167 | 167 |
Width="{Binding ImageViewWidth, Source={x:Static common:ViewerDataModel.Instance}}" |
168 | 168 |
Height="{Binding ImageViewHeight, Source={x:Static common:ViewerDataModel.Instance}}" > |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
711 | 711 |
uri = String.Format(Properties.Settings.Default.subServerImageWebPath, _ViewInfo.ProjectNO, _ViewInfo.DocumentItemID, e.PageNumber); |
712 | 712 |
} |
713 | 713 |
|
714 |
var defaultBitmapImage = new BitmapImage(new Uri(uri)); |
|
715 |
|
|
714 |
var defaultBitmapImage = new BitmapImage(); |
|
715 |
defaultBitmapImage.BeginInit(); |
|
716 |
defaultBitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache; |
|
717 |
defaultBitmapImage.CacheOption = BitmapCacheOption.OnLoad; |
|
718 |
defaultBitmapImage.UriSource = new Uri(uri); |
|
719 |
defaultBitmapImage.EndInit(); |
|
720 |
|
|
721 |
ViewerDataModel.Instance.ImageViewPath = null; |
|
722 |
GC.Collect(); |
|
716 | 723 |
ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage; |
717 | 724 |
ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth; |
718 | 725 |
ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight; |
... | ... | |
721 | 728 |
{ |
722 | 729 |
defaultBitmapImage.DownloadCompleted += (ex, arg) => |
723 | 730 |
{ |
731 |
defaultBitmapImage.Freeze(); |
|
732 |
mainPanel.UpdateLayout(); |
|
733 |
GC.Collect(); |
|
734 |
//System.Diagnostics.Debug.WriteLine("image changed"); |
|
724 | 735 |
ViewerDataModel.Instance.ImageViewPath = defaultBitmapImage; |
725 | 736 |
ViewerDataModel.Instance.ImageViewWidth = defaultBitmapImage.PixelWidth; |
726 | 737 |
ViewerDataModel.Instance.ImageViewHeight = defaultBitmapImage.PixelHeight; |
내보내기 Unified diff