simonb
Topic Author
Posts: 22
Joined: 22 May 2021, 16:35

CroppedBitmap static resources not visible in Blend designer

19 Dec 2021, 14:16

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.
 
User avatar
jsantos
Site Admin
Posts: 3456
Joined: 20 Jan 2012, 17:18
Contact:

Re: CroppedBitmap static resources not visible in Blend designer

22 Dec 2021, 14:17

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.
 
simonb
Topic Author
Posts: 22
Joined: 22 May 2021, 16:35

Re: CroppedBitmap static resources not visible in Blend designer

22 Dec 2021, 17:41

ah ok thanks.
Will work around it using Placeholder rects for now :)

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests