Page 1 of 1

CroppedBitmap static resources not visible in Blend designer

Posted: 19 Dec 2021, 14:16
by simonb
Hi

I'm using Texturepacker to pack sprites & output png/Xaml files such as this:
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <BitmapImage x:Key="UIHUDAtlas" UriSource="UIHUDAtlas.png"/>
  <CroppedBitmap x:Key="UIHUD  004" Source="{StaticResource UIHUDAtlas}" SourceRect="1,1,800,195"/>
  <CroppedBitmap x:Key="UIHUD  002" Source="{StaticResource UIHUDAtlas}" SourceRect="1,198,800,170"/>
I then use that Croppedbitmap as a StaticResource, (Merged in via App.xaml) as part of a simple xaml window, for example :
 
 <Image
 	Width="800"
 	Height="195"
        Source="{StaticResource UIHUD  004}">
 </Image>
This works fine when I run the Blend project & in Unity.
However the images do not appear in the Blend designer?
This makes Designing much slower than it needs to be.

Should I be able to see those images?
if so what is the trick to it?

thanks.

Re: CroppedBitmap static resources not visible in Blend designer

Posted: 22 Dec 2021, 14:17
by jsantos
Hi Simon, yes, unfortunately that's a side effect of using CroppedBitmap. We are working on our own editor that will solve this but meanwhile in Blend, the alternative is using Brushes instead or CroppedBitmap as our previous version of TexturePacker was doing.

Re: CroppedBitmap static resources not visible in Blend designer

Posted: 22 Dec 2021, 17:41
by simonb
ah ok thanks.
Will work around it using Placeholder rects for now :)