DevFear
Topic Author
Posts: 53
Joined: 29 Jun 2022, 12:36

Binding TranslateTransform in Style

18 Aug 2022, 11:46

Worked on moving the element. Describing the style of the element, I noticed a feature. When TranslateTransform is bound to an element property, then in Blend the layout is updated under the change of this property. But in Unity, the binding seems to disappear and TranslateTransform does not work. There are no errors in the logs.

Style:
<Style TargetType="{x:Type local_windows:BaseLocalWindow}">
        <Setter Property="Width" Value="320" />
        <Setter Property="Height" Value="430" />
        <Setter Property="Background" Value="{DynamicResource LowerLevel}" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <TranslateTransform 
                        X="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local_windows:BaseLocalWindow},
                        Path=OffsetX, Mode=OneWay}"
                        Y="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local_windows:BaseLocalWindow},
                        Path=OffsetY, Mode=OneWay}" />
                </TransformGroup>
            </Setter.Value>
        </Setter>
  </Style>
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Binding TranslateTransform in Style

18 Aug 2022, 17:41

Hi, if it works fine in Blend then it must be a bug in our code, could you please report it in our bugtracker?
Thanks.
 
DevFear
Topic Author
Posts: 53
Joined: 29 Jun 2022, 12:36

Re: Binding TranslateTransform in Style

12 Sep 2022, 12:11

 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Binding TranslateTransform in Style

12 Sep 2022, 19:46

Thanks for the report, we will fix this for the next major release.
 
vts_mvalach
Posts: 1
Joined: 03 Jun 2024, 10:40

Re: Binding TranslateTransform in Style

11 Dec 2024, 10:55

This bug is still present 2 years later and it looks to apply to any Transform (or at least also to ScaleTransform) when used within Style... in Noesis 3.2.6 C++ native SDK
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Binding TranslateTransform in Style

12 Dec 2024, 20:51

I updated the ticket in the bugtracker to solve it for the next version.
I was able to reproduce it, the problem is that the same object (Transform) is assigned to all the styled elements, so it is not able to solve the bindings against the correct element.

Who is online

Users browsing this forum: Google [Bot] and 3 guests