Light Up the Web

Blog about programming in Silverlight

  Home  |   Contact  |   Syndication    |   Login
  24 Posts | 0 Stories | 45 Comments | 0 Trackbacks

News

My post about Deep Zoom Composer was recommended by Scott Guthrie! :) (see here)

Archives

About Me

News

Who was here

March 2010 Entries

Few days ago I faced a problem with printing in new Silverlight 4 RC. When you try to dynamically load image (in code behind) and print it, it doesn't work. Paper sheet is blank. Problem XAML file: <Image x:Name="image" Stretch="None" /> XAML.cs: image.Source = new BitmapImage(new Uri(imageUri, UriKind.RelativeOrAbsolute)); Print: var pd = new PrintDocument(); pd.PrintPage += (s, args) => { args.PageVisual = image; }; pd.Print(); Result: Blank paper. Solution What you need to do, is forced...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati