Converter not called in particular case when switching view in modal window

Oct 26, 2011 at 7:20 AM
Edited Oct 26, 2011 at 7:21 AM

Hello

i got a problem :

we've created a wizard, so a usercontrol thats get registered into the popup region defined via the "behaviors:RegionPopupBehaviors.CreateWizardRegionWithName="{x:Static global:RegionNames.Wizard}""

this wizard contains a new region in which all the differents views will be registered

the problem is when, in these views, i have textboxes which fontsize is dynamically computed via converter.

when i switch to one of this view, the converter is not being called, so the fontsize always remain the same.

 

this fontsize is defined in a setter of the textbox style like this :

 

        <Setter Property="FontSize">
            <Setter.Value>
                <PriorityBinding>
                    <Binding Converter="{StaticResource FontScaleConverter}"
                             ConverterParameter="{StaticResource TextFontSize}"
                             Mode="TwoWay"
                             Path="LayoutTransform"
                             RelativeSource="{RelativeSource AncestorType={x:Type custom:MainworkSpace}}"
                             UpdateSourceTrigger="PropertyChanged"  />
                    <Binding Converter="{StaticResource FontScaleConverter}"
                             ConverterParameter="{StaticResource TextFontSize}"
                             Mode="TwoWay"
                             Path="LayoutTransform"
                             RelativeSource="{RelativeSource AncestorType={x:Type Window}}"
                             UpdateSourceTrigger="PropertyChanged" />
                </PriorityBinding>
            </Setter.Value>
        </Setter>

 

and this style is defined in the app resource dictionaries

any help ?

Developer
Oct 26, 2011 at 4:34 PM

Hi,

It would be helpful if you could provide us with a repro sample application, so we can help you find the cause for the problem you're describing.

I hope you find this helpful.

Guido Leandro Maliandi 
http://blogs.southworks.net/gmaliandi