Custom Font in Silverlight OOB - silverlight

Can anyone give me a hand on how to use Custom fonts in a Silverlight app in OOB? It works in the browser correctly.
Furthermore, the font is working and referenced correctly as the designer renders what I am after, but when running the app it is ignored.
Thanks heaps
Edit :
Trying to emulate a Mutlimeter display (thus OOB)
FontFamily="/BNA;component/Fonts/Fonts.zip#Crystal"
Font Properties Build Action = "Resource", Copy to Output Directory = "Copy Always"

Got it sorted, had to embed in to the client app side using
FontFamily="/BNA;component/Crysta.ttf#Crystal" and setting the Font as a Resource

Related

Can't get Dynamic Data Display working with WPF Browser Application

Can I get Dynamic Data Display library working with WPF Browser App? I'm getting "Target Invocation Exception" when attempting to launch the app, regular desktop WPF app runs just fine.
Update 1: "That assembly does not allow partially trusted callers." is the error, got it by adding D3's chart plotter dynamically. Looking into it now.
Fixed by switching to "This is a full trust application" option in the Security tab of my project's properties. May not be appropriate for everyone, check for the potential implications of it. Did the trick for me though.

correct way to add js in sencha architect (ExtJS)?

This thread works well in a mobile app but in a desktop app it would seem I cant add the reference to the external JS in an extjs desktop app.
The instructions from Sencha somehow don't correspond or it doesn't work for me when I try and follow them. So, I am selecting Resources->Library and can see the attribute Include JavaScript (ticked) and Library Base Path:/ext.
The JS file I am using I use in a phone app and its fine - I added it to the app.json in that and compiling the app copies the file over to the target and defers the loading.
In this case with SA I am not seeing the file copied to the target - nor can I follow the instructions with SA 3 that are documented. The only way I can add an external JS is by dropping it onto the filesystem into the ext folder manually. Again, it doesn't appear in the target and certainly errors when I run the app with
Uncaught ReferenceError: hex_sha512 is not defined
This JS has been used in other apps, is proved and tested but just relates to SA or my wrong use of SA.
The proper way to add a resource in Sencha Architect, regardless of framework, is to add it as a JS resource.
This is most easily done by hitting ctrl-t (or cmd-t on a mac) and typing "js resource" (or some shortened string thereof to get autocompletion)...
Alternatively, you can use the toolbox, click "Resources", and drag out or double click "JS Resource"
These are just different user interfaces to accomplish the same task.
Once you've added your JS resource using one of the above methods, you need to set the URL in the config pane (at bottom right unless you've configured Architect to swap the left and right panes)...
The URL is to be set relative to your project folder. If you copy the JS file into your project root under a folder called "lib" for example, then you'd set the url config to "lib/foo.js" - where foo.js is the filename, of course.
Hope that helps!
My lack of understanding of the instructions or they are not clear:
It would seem the way to do it is take eyes up to the top right of SA and spot the + button as shown in the image.
Add the JS resource and scroll up because it may be hidden behind the property inspector.
On setting the url field under properties, the source of the JS appears in the main editing window.
Certainly works fine after the app is built.

Awesomium.NET Flash Player

I'm tring to use Flash Player into WPF application using Awesomium.. I've downloaded and installed the 1.7.2 SDK..
In my WPF app i can now use the Awesomium.NET WebBrowser control, but Flash Player is not working. I've did a quick check on YouTube and videos are loaded using HTML5
I've searched multiple times on google and also on the official website, but there is not much documentation available, and for some users Flash Player is working.
Is there any option to set up? Or i need to specify a Plugin Path?
I don't know if Awesomium is getting the Flash from IE/Chrome/Firefox already installed Browser.. But i do have them all, with Flash plugin Installed.
Currently i do not have much code, only the XAML Awesomium Control, added from VS2012 ToolBox
PS: In my application i only need to open a static SWF with parameters, and a HTML5+JS page so if there is something better for that, i apreciate also alternatives, except the WPF WebControl since it use IE Engine and the HTML5 page i'm loading into it only support IE 10 +
Are you sure that you use correct control? WebControl it is Awesomium control, WebBrowser it's WPF control. If it's correct try create folder 'plugins' in bin folder and put there npswf32_11_8_800_94.dll

Xilium.CefGlue in Winforms application not working properly with ogg

I'm trying to integrate the Xilium.CefGlue browser into an existing project, but i don't seem to get it working with ogg. I'm using the latest versions of the Xilium.CefGlue(xilium-xilium.cefglue-3caa551bd830) and the Cef binary (cef_binary_3.1384.1045). Everything works great when running the projects in the Xilium.CefGlue solution.
To make sure the problem is not caused by my other project, i started a new Winforms project, added references to Xilium.CefGlue.dll, Xilium.CefGlue.Demo.dll and Xilium.CefGlue.WindowsForms.dll. I use the same code in my Program.cs file as used in CefGlue.Client project in the examples, and in my form i create a new CefBrowser and add it directly to my controls. I also placed the needed ceflib files in the correct location.
Now, when running the application and loading a webpage, everything seems to hang unless i change the SingleProcess to true in the CefSettings in my Program.cs. However, when loading another page which contains html5 video (ogg), the page is not getting rendered. I do notice that the interaction is there, because i can start the video by clicking in the center of the page where a button should be located. I can hear the video playing, but the page simply stays blank.
Loading the same page in the CefGlue.Client does work like it should. Now, when i change the setting SingleProcess to true in the example project CefGlue.client, the same thing occurs, so i guess it must have something to do with this.
Anyone got any ideas on what is going wrong?
Thanks,
Andy
Found the answer somewhere else by Sébastien Frippiat:
it seems that using SingleProcess=false doesn't work when debugging with Visual Studio (should be related to Visual Studio using a executable called project_exe.vshost.exe instead of project_exe.exe).
So i changed my CefSettings to this:
var settings = new CefSettings
{
BrowserSubprocessPath = #"C:\CefGlueBrowser\CefGlueBrowser\bin\x86\Debug\CefGlueBrowser.exe",
SingleProcess = false,
MultiThreadedMessageLoop = true,
LogSeverity = CefLogSeverity.Default,
LogFile = "CefGlue.log",
};
That seems to fix it for debugging.
Just disable Visual Studio Hosting Process and you wont have problem for debugging
http://msdn.microsoft.com/en-us/library/ms185330(v=vs.80).aspx

How do you set the size of a Silverlight OOB application window?

When ever I launch my Silverlight Out-of-Browser application the window size does not match my layout. I've seen ways to provide different size icons using the XML file for Deployment.ApplicationIdentity, but not to specify size of window.
right click on the project go to properties click out of browser settings. there you can specify
This is managed via the Application Manifest file.
<SilverlightApp>
<source>XAML or XAP file</source>
<version>1.0 | 2.0</version>
<width>[value in browser units or percentage]</width>
<height>[value in browser units or percentage]</height>
</SilverlightApp>

Resources