View Issue Details

IDProjectCategoryView StatusLast Update
0001745NoesisGUIC++ SDKpublic2020-07-06 13:43
ReporterExt3h Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version3.0.2 
Target Version3.0.3Fixed in Version3.0.3 
Summary0001745: VirtualizingPanel.VirtualizationMode=Recycling breaks TextElement.FontFamily inheritence
Description

Got the hirarchy shown in attached tree.png, defined by the following declaration

<Style x:Key="VirtualList" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="False"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
                <Border
                    BorderThickness="{TemplateBinding Border.BorderThickness}"
                    Padding="{TemplateBinding Control.Padding}"
                    BorderBrush="{TemplateBinding Border.BorderBrush}"
                    Background="{TemplateBinding Panel.Background}">
                    <ScrollViewer x:Name="PART_Scroll"
                        Padding="{TemplateBinding Control.Padding}"
                        Focusable="False">
                        <ItemsPresenter />
                    </ScrollViewer>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="ItemsPanel">
        <Setter.Value>
            <ItemsPanelTemplate>
                <VirtualizingStackPanel/>
            </ItemsPanelTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
    <!-- Recycling would be better, but Noesis appears to have a data race in the bindings -->
    <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
    <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
</Style>

<DataTemplate x:Key="GnomeScheduleButtonTemplate">
    <Button x:Name="Sched_Button" 
        Content="{Binding Activity}"
        Style="{StaticResource GnomeScheduleButtonStyle}"
        Command="{Binding CmdSetHour}" />
</DataTemplate>

<DataTemplate x:Key="PopGnomeSchedRowTemplate">
    <ItemsControl  ItemsSource="{Binding Schedule}" ItemTemplate="{StaticResource GnomeScheduleButtonTemplate}" Height="35">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <StackPanel Orientation="Horizontal"/>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
    </ItemsControl>
</DataTemplate>

     <ItemsControl x:Name="SVActivities"
         ItemsSource="{Binding Schedules}" ItemTemplate="{StaticResource PopGnomeSchedRowTemplate}"
         Grid.Row="1" Grid.Column="1"  Style="{StaticResource VirtualList}"
         ScrollViewer.VerticalScrollBarVisibility="Auto">
     </ItemsControl>

The issue occurs on the highlighted element. After the element has been recycled, the inherited TextElement.FontFamily for the inner (not virtualized) ContentPresenter node becomes empty.
When this happens, it impacts all children of the inner ItemsControl. The inner ItemsControl itself still has a sensible value for FontFamily (also inherited) in that state, according to the inspector, but inheritence from it is broken.

Setting and clearing a local value for TextElement.FontFamily on the broken ContentPresenter node restores the correctly inherited values, both according to inspector and visually confirmed.

Attached Files
tree.png (119,522 bytes)   
tree.png (119,522 bytes)   
PlatformWindows

Activities

Issue History

Date Modified Username Field Change
2020-07-02 10:17 Ext3h New Issue
2020-07-02 10:17 Ext3h File Added: tree.png
2020-07-06 10:50 sfernandez Assigned To => sfernandez
2020-07-06 10:50 sfernandez Status new => assigned
2020-07-06 10:50 sfernandez Target Version => 3.0.3
2020-07-06 13:43 sfernandez Status assigned => resolved
2020-07-06 13:43 sfernandez Resolution open => fixed
2020-07-06 13:43 sfernandez Fixed in Version => 3.0.3