示例#1
0
        public static void Initialize()
        {
            var defaultFilePath = Path.Combine(Constant.ImagesDirectory, "file.png");

            _defaultFileImage = new BitmapImage(new Uri(defaultFilePath))
            {
                DecodePixelHeight = 32,
                DecodePixelWidth  = 32
            };
            _defaultFileImage.Freeze();
            _errorImage = new BitmapImage(new Uri(Constant.ErrorIcon))
            {
                DecodePixelHeight = 32,
                DecodePixelWidth  = 32
            };
            _errorImage.Freeze();
            _cache = new ImageCache();
        }