View Issue Details

IDProjectCategoryView StatusLast Update
0001822NoesisGUIC++ SDKpublic2021-05-27 10:46
Reportersfernandez Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.0.6 
Target Version3.1 
Summary0001822: Different objects when using resources defined inside a template element
Description

Giving the following control template:

<ControlTemplate TargetType="Control">
<Grid x:Name="root">
<Grid.Resources>
<ImageBrush x:Key="imgBrush" ImageSource="Test.png"/>
</Grid.Resources>
<Rectangle x:Name="rect" Fill="{StaticResource imgBrush}"/>
</Grid>
</ControlTemplate>

When getting a reference to the resource in Grid.Resources and Rectangle.Fill, it returns different objects in Noesis, in WPF both are the same.

Grid root = (Grid)control.Template.FindName("root", control);
ImageBrush brush1 = (ImageBrush)root.FindResource("imgBrush");
Rectangle rect = (Rectangle)control.Template.FindName("rect", control);
ImageBrush brush2 = (ImageBrush)rect.Fill;
if (brush1 == brush2) ... // True for WPF, False for Noesis

PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-10-27 12:03 sfernandez New Issue
2021-05-27 10:46 sfernandez Assigned To => sfernandez
2021-05-27 10:46 sfernandez Status new => assigned
2021-05-27 10:46 sfernandez Target Version => 3.1
2021-05-27 10:46 sfernandez Description Updated
2021-05-27 10:46 sfernandez Additional Information Updated