简体   繁体   中英

Silverlight/Wpf scale control

I have one silverlight control and i want to add it scale property. I will try to describe what i want. Imagine you have a table that looks great on 1600x1200 resolution, but on 800x600 it sucks because all rows and columns become 2 times smaller but font stays original size. So i want to know if there is some technique allows me to tell control to reneder like 1600x1200 and then say scale 0.5.

I am looking for this solution because we already have great program with nice design, but it looks ugly on notebook screen and i want to fix that as easy as possible.

Also i am using telerik, but their fluid control is not what i want.

Try looking at the ScaleTransform Class page on MSDN. Here's a short example of how you could use it:

<YourPrefix:YourUserControl ... >
    <YourPrefix:YourUserControl.RenderTransform>
        <ScaleTransform ScaleX="0.5" ScaleY="0.5" />
    </YourPrefix:YourUserControl.RenderTransform>
</YourPrefix:YourUserControl>

This would scale your control by a factor of 0.5, but these scale factors can also be data bound.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM