Assets from a shared project not rendered in design mode (XAML) - xaml

I have a Windows Phone 8 Silverlight project and a Shared Project with some Assets (fonts, images, etc).
When I launch the emulator or deploy to the phone the content is correctly shown, but when I'm in design mode this content is not shown at all.
This is how I set a custom font stored in the shared project to a TextBlock:
<TextBlock Text="play" FontFamily="/Assets/fonts/BondoluoPeek.ttf#Bondoluo Peek"/>
How can I solve this?
Thank you!

I used to have this problem once, turned out the designer was reading from some cached files. Try clearing cache, do a complete rebuild of the project with the given assets and then reload the designer.

Related

how could we access the images located outside the expo project?

I created a mobile app by expo (react native), I would like to display profile image, knowing that the images are located outside my project.
when I want to access any image I do not get there, and I get this type of error
"SHA-1 for file (D:\Workspace\ImagesProfile\images3.jpg) is not computed".
this is the hierarchy of my workspace.
-Workspace
--ImagesProfile
--Myproject
Pleace how can we solve this problem?
The way the react-native packager works right now, it's just going to scan the roots of your project and below when creating the JavaScript bundle, so it will be really hard to do this.
You basically just need to put the files under the root of your directory. There are some tools out there for syncing files from another directory into a directory under the root so you could use one of those if you really need to.
Some people are working on ways to make symlinks work with this. Notably, you might look at Haul from Callstack. https://github.com/callstack-io/haul But that isn't integrated into Expo yet.
Okay at first you should understand what you are doing. You're creating a react native application, which means this application is running on external devices and not on your PC. Your simulator or expo client running your application encapsulated from your PC using only project files. When you wanna use external images in your application you need to host them. You can create a local docker instance as image server ( e.g. an express application with a static folder ).
To make it clear, it's not possible to use images inside your filesystem which are not a part of your react native application. You can use external image server like "imgbb" for test purposes, but it's not recommended to use them in your final version.
Happy Coding!

Windows phone app crashes on launch when using the MvvmCross template

I'm using the supplied "MvvmCross.WindowsPhone" template from within Visual Studio.
After making all the required changes, when you try and launch the app in the emulator - it just opens and then immediately crashes.
Firstly -when a win phone app exibits this behaviour - check the project properties - startup object. If this isn't set, then when the app launches it can't find what class it must use to initialize the app.
In this case, the startup object wasn't set, but there was nothing in the dropdown, even though there was an App file in the project.
I eventually pinned it down to the App.xaml that isn't marked with a build action of "ApplicationDefinition". (resulting in the startup object in project properties being blank.)
Unfortunately setting the correct build action didn't solve the problem.
Only when I set a different project as startup, and then moved back to the windows phone project, did the compilation work again.
Hopefully the template will be updated to set the correct build action for the App.xaml file.

How can I speed up debugging in Sencha Touch?

I'd like to be able to speed-up the debugging process when building Sencha Touch apps. At the moment I have to disable caching as any changes I make to the source would not get updated when refreshing the application and I also want to persist breakpoints in Chrome.
How can I both cache the files that are unlikely to change but refresh those that do?
Currently, when I press Ctrl+F5, it takes 4-5 seconds to load the app. It's loading all the Sencha Touch required .js files as well as any for the app itself. I think what I would like to do is cache on a path basis, so any files on the sencha touch source folder are cached and not re-loaded, but app files aren't.
try using an application cache manifest you can learn to configure one here. Application cache is not for folders though but for files so you have to include all files that you want to be cached permanantly.

WinRT's WebView is not loading the .css file when running on an actual Tablet

I am using a WebView control under WinRT to display html pages that are loaded from a sub folder of my Assets folder. When I run my app on a Windows 8 PC or on the tablet emulator everything works fine. However, when I am running on an actual Surface tablet, the pages do not seem to be loading the .css file and are, therefore, not formatted properly.
Is there something that I am missing here?
Thanks
Verify that the CSS file is being included in the app you're running on the Surface. Create an app package and then look inside it. To be thorough, copy the app package to your Surface and run it there to verify that the problem still occurs.
Run the Windows App Certification Kit (WACK) tool to uncover common problems. This is just a wild guess, but maybe your CSS file has the wrong encoding, and this causes a problem on Windows RT. Really, this is just a wild guess.

How can I compress Titanium Application Size after building it?

I built a Login application in which I have 3 Windows
Log In Windows
Registration Windows
After Log in details window about the user
In this application, the database stores data about user. The app is intended to be multi-platform & run on iPhone or Android.
When I install in device than it take 12MB or more Size (application size 12MB or more size).
How can I compress it?
Here are several things you can try:
Create a new Titanium project and deploy it to your device. This is likely the minimum size you can attain. Add this minimum size to the size of your Resources folder and the result should be around the same as 12mb. If so, there is little more you can do.
Check your Resources folder and remove anything that you don't want included in your app, such as .psd files. The build folders you mentioned in your comments have little to do with the actual app size.
Make sure you have not installed any modules. Check /Library/Application Support/Titanium/modules for any modules that shouldn't be there. I have 14 modules there by default, for example.
If you are very desperate, you can attempt to hack in Xcode to remove classes that you aren't using. See the responses by the "professional" developer here http://developer.appcelerator.com/question/133971/why-are-the-size-of-titanium-showcase-apps-so-small#answer-233668 This won't be easy and should only be attempted as a last resort.
In general however, there is no need to try too hard to reduce the file size. From my experience, even after adding a lot more windows and functionality, the file size barely increases by a couple of MB.
Also, note that your release file size can be smaller than the app you are testing on your device. See http://developer.appcelerator.com/question/126632/android-apk-filesize
From my experience with Android, if you are running the application on the device, vs. deploying the application, the app size is much larger. Try deploying and installing on device that way to see if it is any different. But Titanium already compresses the application.
Here are few questions which might become answer.
Are you using Mac for both Android and iPhone deployment. If so, the Android App would be of larger size compared to the same App deployed from Windows.
You might have splash screen, now go and check your folder here that you have any other JPEG files apart from the spash screen and ico file
\build\android\res\drawable
Which version of Titanium SDK are you using for building the Application? Try to compile the same Application using Titanium SDK 1.7.5, if you are using 1.8.1 and above.
Note: If you are trying to compile your App in Titanium SDK 1.7.5 for Mac, make sure you have XCode 4.2.1 for Lion and Not XCode 4.3.