Hi,
I don't know if this is the right place, is there a way to convert width/height in XAML controls to cm/in and vice versa? for example if I need to print a square of 10cm, how can I know the value to put in the XAML? thanks!
kind regards
@emiliano84 I think you can easily create a converter that will automatically convert a cm value to a pixel value.
I assume you want to create a printable page where all controls (containers) are based on cm/in and not pixel. Here is a possible solution :
<Page Width="{x:Bind CmToPixel(21)}" Height="{x:Bind CmToPixel(29.7)}">
...
</Page>
@Odonno yeah that's a great idea, I know how to do it, but I don't know how to find the ratio to convert cm/px? thank you so much
ping @deltakosh
We may be able to provide helpers methods like CmToPixel and InchToPixel (and vice versa). @nmetulev What is your opinion?
That would be an interesting helper, should be straightforward to add. @Odonno, want to add it?