View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001476 | NoesisGUI | C++ SDK | public | 2019-05-24 18:52 | 2021-11-15 10:45 |
Reporter | sfernandez | Assigned To | sfernandez | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.2.2 | ||||
Target Version | 3.1.2 | Fixed in Version | 3.1.2 | ||
Summary | 0001476: Freezable objects inside templates are not correctly registered in the NameScope | ||||
Description | When a Freezable object inside a template has a name and the template gets applied to a control, the object registered in the NameScope does not correspond to the one that is created for that control visual tree. For example, in the following template, the DataTrigger is not able to find the correct "DropItem" behavior: <DataTemplate> <Grid> <Border x:Name="DragBorder" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"> <i:Interaction.Behaviors> <LL:DropItemBehavior x:Name="DropItem"/> </i:Interaction.Behaviors> </Border> </Border> <DataTemplate.Triggers> <DataTrigger Binding="{Binding IsDragOver, ElementName=DropItem}" Value="True"> <Setter Property="Background" Value="DodgerBlue" TargetName="DragBorder"/> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
related to | 0002187 | resolved | sfernandez | Cannot animate RenderTransform: 'root element is frozen' |
The current workaround is by accesing the freezable object through its owner FrameworkElement. So the previous xaml should work like this:<DataTemplate> <Grid> <Border x:Name="DragBorder" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"> <i:Interaction.Behaviors> <LL:DropItemBehavior x:Name="DropItem"/> </i:Interaction.Behaviors> </Border> </Border> <DataTemplate.Triggers> <DataTrigger Binding="{Binding (i:Interaction.Behaviors)[0].IsDragOver, ElementName=DragBorder}" Value="True"> <Setter Property="Background" Value="DodgerBlue" TargetName="DragBorder"/> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2019-05-24 18:52 | sfernandez | New Issue | |
2019-05-24 18:52 | sfernandez | Assigned To | => sfernandez |
2019-05-24 18:52 | sfernandez | Status | new => assigned |
2019-05-24 18:52 | sfernandez | Target Version | => 2.2.3 |
2019-06-18 16:59 | sfernandez | Target Version | 2.2.3 => 2.2.4 |
2019-08-07 16:36 | sfernandez | Target Version | 2.2.4 => 2.3.0 |
2021-05-24 20:54 | sfernandez | Note Added: 0007256 | |
2021-09-23 11:19 | sfernandez | Target Version | => 3.1.2 |
2021-11-15 10:17 | sfernandez | Relationship added | related to 0002187 |
2021-11-15 10:45 | sfernandez | Status | assigned => resolved |
2021-11-15 10:45 | sfernandez | Resolution | open => fixed |
2021-11-15 10:45 | sfernandez | Fixed in Version | => 3.1.2 |