Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

User Control size to content

$
0
0

Hello!

I've created User Conrol that contains 2 images on the distance between them.

Distance is set like DependencyProperty in MyControl : UserControl class.

I got 3 more DependencyProperties: 1st image path, 2d image path and width for both of them (uniform stretch).

I need to set up MyControl Height property so as to fit bottom edge of the 2d image.

Basically Height value is:

MyControl.Height = top_image.Height + Distance + bot_image.Height;
How can I do this in xaml?



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>