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

Issues with DynamicResource, Width and Height

$
0
0

I have a skinnable application where everytime I change my skin new merged resource load itself and old skin is removed.

Every seems to works fine until I have some issues on Width / Height of my elements such as an image and the window itself.

This is my skin_xxx.xaml

<sys:Double x:Key="win_width">366</sys:Double><sys:Double x:Key="win_height">237</sys:Double>

Whenever I change my skin, nothing changes.

The same happens for some of my DependencyProperty of type Double in my custom objects (image or valueconverter inherited), so I wonder what 's the problem.

For example, Opacity value works correctly and changes are visible.

Any help?

EDIT:

Just to be more accurate, image has no problem, while my value converter still has.

It does not update my property

public static readonly DependencyProperty MeterWidthProperty =
            DependencyProperty.Register("MeterWidth", typeof(Double), typeof(BarMeterTranslateConverter));

        public Double MeterWidth
        {
            get { return (double)GetValue(MeterWidthProperty); }
            set { SetValue(MeterWidthProperty, value); }

Same issue with my main Window.Width and Height property


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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