I have generated a image from large content xaml layout. But image is shrink. We have used "RenderTargetBitmap.RenderAsync()" method for image generate. How to get actual size image from xaml layout? please check below attached image.
I have generated a image from large content xaml layout. But image is shrink. We have used "RenderTargetBitmap.RenderAsync()" method for image generate. How to get actual size image from xaml layout? please check below attached image.
@NikenWadkar-4613 How about the progress? If your question hasn't been solved, please feel free to contact us.
Hi,
Welcome to Microsoft Q&A!
You could use RenderAsync(UIElement, Int32, Int32) method to specify values for scaledWidth and scaledHeight to alter the original source's rendering dimension. As for actual size of container, you could use FrameworkElement.ActualWidth and FrameworkElement.ActualHeight property to get (such as mygrid.ActualWidth).
What you need to know is if scaledWidth and scaledHeight are both set, the aspect ratio of the original bitmap is ignored, and your values can alter the aspect ratio. More info could be found in this part about scaledWidth and scaledHeight values of this official document.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
5 people are following this question.
UWP - Unable to Add ListBox Header (Not ListView)
How to control MapControl pushpin text from click events
How to add title text view in MasterDetailsView
How to use Windows system-provided "OK" string resource as CloseButtonText in ContentDialog
[UWP][XAML] Grid greedy column with trailing columns still visible