I would like my application WPF can load a ".exe" file and show it inside itself. I have my main WPF that checks a folder where it load plugins with MEF, but I only can load "dll" files without UI. So I found x plugins, I can load informations and in the same way I want to open a UI associate with the dll loaded.
I don't know if it's understandable what I want to do but if you have an idea that can help me, I take it.
In a dll you can add UI elements.
Add for example a Window to your plugin project (project with dll output) and use the following code when you create an instance of your plugin in your main application:
Window win = new Window();
win.Show();
Related
So normally, if you are developing a web application you will have to create your own .css files. In my case, I used bootstrap to design my application and created my own .css files to suit my needs.
Recently, I just found this Report Manager plugin for CakePHP. I put my plugin in the plugin folder and loaded it on my bootstrap.php file. Everything went smoothly and I can create reports.
Now, this is my first time handling plugins. Since this Report Manager plugin is using the default CakePHP design, how can I apply the bootstrap and my own design to this plugin?
Read the documentation!
You can override any plugin views from inside your app using special
paths. If you have a plugin called ‘ContactManager’ you can override
the template files of the plugin with application specific view logic
by creating files using the following template
src/Template/Plugin/[Plugin]/[Controller]/[view].ctp. For the Contacts
controller you could make the following file:
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.
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
I've got a WPF application I'm building. The solution contains a WPF control library project called CustomControls. There's a folder under the CustomControls project folder called Layouts. There's an XML file in that folder called OnscreenLayout.xml. The Build Action property for this file is set to Embedded Resource.
I'm trying to load that file into a stream in the code behind and pass the stream on to a method of a third party library class. The code in question looks like this:
OnscreenKeyboard.DefaultLayout = FPS.VirtualKeyboard.KeyboardLayout.Create(
App.GetResourceStream(
new Uri( #"/CustomControls;component/Layouts/OnscreenLayout.xml",
UriKind.Relative ) ).Stream );
When this code runs, it throws an IOException with the message
Cannot locate resource 'layouts/onscreenlayout.xml'.
I've even tried using this string for the Uri:
#"pack://application:,,,/CustomControls;component/Layouts/OnscreenLayout.xml"
But no joy. What am I doing wrong?
Edit: I have even tried changing the build action for the file from "Embedded Resource" to "Resource" and it still doesn't work.
Thanks
Tony
Only Content and Resource build actions are valid for resource files used in WPF application.
Please avoid other build actions such as Embedded Resource - this will work as well with appropriate API, but it is not favored by WPF.
I am totally to Silverlight and am Getting started. I finished the first of the Getting started series here and now seeing into HTML Bridge now over here. Visual Studio created a website for me when it created the new silverlight application. For the HTML bridge tutorial I created another silverlight page(Is this what i should create) and put some code into it.
Question
How do I embed this into a html page? ( I know how to do it using markup as well as javascript, I am confused as to how to get the application out of single xap file inside ClientBin directory)
With Silverlight you are dealing with a single plugin within a HTML page. That plugin is the single XAP file that the HTML page downloads.
Your Silverlight app may also have many pages, but its navigation is not the same as HTML navigation (it uses bookmark URLs to fool the browser into staying on the same page while it changes content). There is only the one HTML page involved.
Initially, just to test your new page, you can change the app.xaml.cs file to create your new Silverlight Page instead of RootVisual = new Main() etc. Long term you need one Silverlight application per separate plugin your require.
Update (from comments):
Pages in Silverlight are changed by substituting a visual element of the single main page with the contents of another Silverlight page.
You cannot simply replace the RootVisual (as that can only be set at startup).
Start with a new Navigation or Business application project to see the basics (navigation adds a lot of complexity, but once you see how it works it is pretty cool).