c# - How to get views based on resolution whilst using composition root in WPF application -


I have a scenario where the resolution of the target PC has a different screen resolution. XAM can handle it somewhat but when If the resolution varies from 800 * 600 to 1900 * 1400 then it is best to have two different views / layout (XAM files).

My application is an MVVM application and I'm willing to use Unity as an IOC container code will look something like

  Public partial class app: Application {secure} Start Override Zero (StartupAventErgSE) {base.OnStartup (e); ComposeObjects (); Application.Current.MainWindow.Show (); } Private Zero Compose Objects () {...... ...... Applications Present. Manwindo = Container Resolve & lt; Manual View & gt; (); }}  

Is there any way that I can solve main window and other ideas on the basis of resolution? With the different layouts for the men-wingu UI, I have some ideas.

In addition to this, menuView XAMML will contain references to several other views, which may also require a solution depending on the screen resolution.

You Screen.PrimaryScreen WorkingArea Code> System. Windows .form namespace). This will return the screen size as a rectangle

From here create multiple views for your app or resize your control accordingly

< / Html>

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -