I need help with a change of perspective.
Recently, due to the company's business needs, it is necessary to migrate the existing Win32 software to the UWP platform. Because the software involves multiple devices, different devices have their own specific interfaces.
If the released software package directly includes all devices, the software package will be too large. Therefore, we want to enable the main software framework to support the operation of the corresponding device by downloading or additional installation when the user's related equipment is identified.
From the information found so far, this method is somewhat similar to the Optional Package. However, the actual experiment found that it can only support the separation of the back-end logic code, but not the XAML Page into the optional package.
Is there any way to separate the XAML Page and load it dynamically?
I'm also currently looking at solutions to load XAML Page dynamically in UWP. While I don't have a working solution yet it looks like I'm on the right track.
It seems Windows Community Toolkit Sample App is loading XAML dynamically so all you should need is in that code base.
Related
I'm building a set of small internal apps for our business. A majority are web based tools. To provide easy access to all of the tools to all our staff. Previously I built small windows applications which are used currently. However, I'm looking to upgrade these to Universal Apps as we can better distribute future applications through our Microsoft Business Store.
Currently when placing a WebView into the UWP app, the app loads and functions as expected in terms of loading the WebView. However I cannot seem to find a means to implement Back / Forward navigation (previously this was a toggled option in the properties group) if a user navigates using Back/Forward on their mouse etc. Any pointers would be greatly appreciated. No doubt it's something quite obvious I haven't spotted.
I was expecting the basic back / forward navigation to work out of the box (as is the case I have experienced previously when developing for other platforms)
The app I'm currently working on is using the UWP with XAML and C# and currently has the WebViews implemented using:
<WebView x:Name="webView" Source="https://app.domain.com"/>
within MainPage.xaml and no further modifications made to this app as it stands.
I regularly use SO as a guest to find answers to questions but I couldn't see a direct answer to this scenario.
Thanks
The WebView class has built-in APIs that could Go Back/Forward. You could add some buttons and call them in the click event.
I'm wondering if it's possible for a Xamarin application (all the platforms : Android, iOS, Windows Phone) to detect and load assemblies at runtime.
This is the kind of thing that I already did in WPF, and I'd like to use those modules (maybe with some modifications) in a Xamarin app.
I've spent yesterday looking for info online, and today I tried to implement a solution, but without success.
Prism seemed to be a way to do it, but it works only in WPF.
The restriction which makes this difficult is that I don't know at compile time any information about the assemblies. No names, no versions, no classes.
I can put the name and the version in the filename, and maybe find the classes by reflection. Using an interface as entry point (Prism use this), I should be able to do it.
Do you have any thoughts about this challenge ?
Thank you very much !
iOS: No
Apple does not allow code that was not bundled into the app at signing time to be executed, thus no on-the-fly Jit'ing of CIL allowed. The only exception to this is Javascript code that is run via their Nitro JavaScript Engine.
Android: Yes
Google allows just about anything you can think of, for better or worse ;-)
Windows Phone: No
All code must be signed as part of the Microsoft Store' App Ingestion process and thus you can not dynamically load assemblies later
Note: If this is a hard requirement for your app, you should look at hybrid mobile apps, like Cordova/Ionic, where you can perform a hot push to roll out new features, bugs fixes, etc... Besides self-hosting those hot pushes, various vendors support hosting of those, even Microsoft Azure has a full versioning publication system for this. Of course you would most likely be coding in JavaScript (or some trans-compiled variant).
It seems to be a deliberate security of Windows 10 Store apps that assemblies not be allowed to be loaded at runtime. I think that this feature is massive overkill and stops UWP development dead in its tracks. However, if it is a rock solid design decision by Microsoft, there is nothing we can do to argue with it.
Instead, I'd like to ask the question, assuming that you were not deploying your UWP app to the store, would it still be impossible to load an assembly dynamically? If it's possible, how?
Please see this feature request: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18145291-dynamically-load-assembly
Regardless of what environment you deploy your UWP application to, the UWP API will be the same. Choosing to deploy your app internally instead of to the Windows Store will not enable non-supported API features, eg. Assembly.Load().
It seems as though the answer to this question is no.
The game has changed in UWP. UWP is a platform which is geared toward getting apps in to the store. It's a stripped down platform and doesn't appear to allow you to load assemblies at runtime. This was possible in .NET.
However, there does seem to be a way to run UWP style apps on top of the .NET runtime using the Desktop Bridge. I'm not really that familiar with it, but you can read more here as a starting my point. My guess is that if you want to load assemblies dynamically, the best approach would be to use this:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root
I have a ASP.NET Web Application. I want to access this application in Smart phones and tablet computer. So please help me on this. What are the changes required?
The answer to your question could range from nothing to everything. At the end of the day, it all depends on what you existing app looks like in a target mobile device (iPad, Android, etc). If your existing app looks and functions properly, then you don't have to do anything. If not, well, you figure out what's wrong and make it work.
Your question really isn't suited for StackOverflow because it is way to broad and impossible to answer.
Asp.net applications can run in web browsers, including the ones that come with smart phones and tablets. The main concern would be the various screen sizes of the various devices. Because they vary so much, a good design concept for your asp.net application would be to layout content in a way it can adapt to the screen size.
The best technology for this within an asp.net application, especially for an application that was already built, would be to implement style sheets (.css)
Look at these styles as an example:
float, clear, max-width and max-height
Check these and other styles at: http://www.w3schools.com/css/
Now, there is also the concept of having your asp.net application detect which device is being used and then generate UI code (or load .ascx controls) accordingly to provide device specific displays.
Check:
Request.Browser.IsMobileDevice
Request.UserAgent (http://msdn.microsoft.com/en-us/library/system.web.httprequest.useragent.aspx)
However, I would only suggest using this to a minimum, because if you make a change to your UI, you won’t want to keep updating multiple instances of the UI for different devices.
A good compromise would be to build a style sheet for each group of screen sizes (smart phone, tablet, PC, etc.) and then detect which device is in use and include the respective style sheet.
NB: there are many open source projects, which could get you running more quickly with mobile development in mind. Check sourceforge.net and codeplex.com for examples.
I've inherited a C# window's application that I'm not real crazy about. I've got a looming deadline and I'm scared to death that some of my changes might be having adverse effects on existing functionality.
I've got a hobbyist background to RoR and I'm fairly comfortable with testing in that framework (using both RSpec and Cucumber).
I love having test scripts that can be ran on a regular basis and I'm willing to spend my personal time developing those for this particular project. I purchased a book from PragProg.com on scripted GUI testing with Ruby (http://pragprog.com/titles/idgtr/scripted-gui-testing-with-ruby). So far, I'm digging what I'm seeing and I think that this should work well.
Unfortunately, I've got a fundamental lack of understanding concerning Windows app development. I'm making calles to FindWindowEx (via Win32API) to "attempt" to retrieve sub-controls in my application.
A big part of my confusion is how I should retrieve the Class Name of the control that I'm trying to capture. The example provided in the text is as follows:
edit = find_window_ex.call #main_window, 0, 'ATL:00434310', nil
Where #main_window is my application's main window handle, and 'ATL:...' is the class of a text box area. There is no explanation given as to how the author arrived at 'ATL:...'.
I've read some very old posts concerning MS's SPY++, but those seem to be obsolete (or for some reason it wasn't installed when I installed vs2010).
So, what's the best way for me to find control classes to be used with the findWindowEx call? I do have the source code - should I be pulling from there? What if I don't have the source code and I want to automate an application? Is there a utility that allows you to somehow "browse" controls on a running application?
Sorry for the length - thanks in advance for the help!
Bob
The best is for you to install the components so that you get Spy++, this is the best way I know of to get to the actual class names esp. if you do not have the source to the original controls, which might be from a library or possibly some standard ActiveX controls that Microsoft ships.
The ATL class name is probably for controls developed using Microsoft Active Template Library (ATL), this is a C++ template library which significantly simplifies the development of ActiveX controls, and COM objects etc. in C++.