Users Pricing

forum

Home Forums WPF set width of control by binding in centimeter – MindStick

WPF set width of control by binding in centimeter

Takeshi Okada 2617 23 Sep 2013

I want to set the width of my control by binding and in centimeters. (it's for the size of my printout so I find it easy to work with centimeters)

So I want to do something like this:

 <FlowDocument x:Name="flowdocument" PageWidth="{Binding Barcode.Width}" PageHeight="{Binding BarcodeSjabloon.Height}">

but I want to set it in centimeters like this:

 <FlowDocument x:Name="flowdocument" PageWidth="20cm" PageHeight="30cm">

Any idea how to achieve this?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md