Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9181687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:22:39+00:00 2026-06-17T18:22:39+00:00

I have a WPF that will be displayed on a very small device with

  • 0

I have a WPF that will be displayed on a very small device with a small screen but the operating system has a high resolution. The resolution cannot be changed (hardware restrictions), so I must “magnify” my WPF app so that it is usable on a small device.

My thoughts were to do something like the ‘zoom in/out’ functionality in chrome (well, other browsers too). For example, visit jquery mobile and press ctrl+. I want a similar effect for a WPF app.

I was thinking something like…

ZoomFactor = 2
WPFApp.RenderSize.Width = WPFApp.Size.Width / ZoomFactor
WPFApp.RenderSize.Height = WPFApp.Size.Height / ZoomFactor 

This would ‘theoretically’ make WPF thinking it is rendering for a large screen, however the application will still actually have double the realestate (ZoomFactor).

Then, I was thinking a ScaleTransform would zoom the rendered content to fill the entire application.

WFPApp.RenderedContent.ScaleTransformX = ZoomFactor
WPFApp.RenderedContent.ScaleTransformY = ZoomFactor

This would also allow the application to be sized in any way and a ZoomFactor will still be applied to the content.

I am relatively new to WPF, so there might be a way to do this out of the box, but if not, how would I achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:22:40+00:00Added an answer on June 17, 2026 at 6:22 pm

    Try using a layout transformation with a scale transform.

    Worked like a charm. This is the logic I used to generate the scale.

    public static double GetElementScale(Size designSize, Size currentSize)
    {
        var ratioY = currentSize.Height / designSize.Height;
        var ratioX =  currentSize.Width / designSize.Width;
    
        return Math.Max(ratioX, ratioY);
    }
    

    Then, with two scale properties on my page, I used the following.

    <controls:MPage.LayoutTransform>
        <ScaleTransform  ScaleY="{Binding Path=ScaleY, RelativeSource={RelativeSource AncestorType={x:Type controls:MPage}}}" ScaleX="{Binding Path=ScaleX, RelativeSource={RelativeSource AncestorType={x:Type controls:MPage}}}" />
    </controls:MPage.LayoutTransform>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a desktop application developed in WPF that has several views displayed as
I have a WPF application that will always run on windows 7, it opens
I have a WPF page that has 2 ContentControls on it. Both of the
I have a WPF TabControl that has a couple of buttons in the TabItem
In my WPF app (csharp) I have an event handler that when triggered will
Basically I have a WPF application that will display announcements to the user within
I have a WPF application that connects via a socket to a device and
I have a small report/logging application written in C#.NET 4.0 and WPF that I
I have a WPF UserControl (Foo.xaml) that should be displayed streched (VerticalAlignment=Stretch HorizontalAlignment=Stretch) on
I have WPF Span that is used as a source to a TextBlock. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.