View Issue Details

IDProjectCategoryView StatusLast Update
0001048NoesisGUIUnitypublic2018-11-22 11:32
ReporterXaeroDegreaz Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version1.3.0 
Target Version2.2.0Fixed in Version2.2.0b1 
Summary0001048: Unity - Framerate drops when pressing shift+tab, tab or clicking rightmost column inside of a ListView
Description

From: http://www.noesisengine.com/forums/posting.php?mode=edit&f=3&p=5951

Here's the code-behind:

[code]
using System.Collections.ObjectModel;
using Noesis;

namespace KazBall.Ui.Hud
{
public class ScoreScreen : UserControl
{
public ScoreScreen()
{
Initialized += ( sender, args ) => { DataContext = new ScoreScreenViewModel( this ); };
GUI.LoadComponent( this, "Assets/Ui/Hud/ScoreScreen.xaml" );
}
}

public class ScoreScreenViewModel
{
    public class ScoreItem
    {
        public string PlayerName { get; set; }
        public int Score { get; set; }
        public string TeamColour { get; set; }
    }

    public ObservableCollection<ScoreItem> ScoreItems { get; set; } = new ObservableCollection<ScoreItem>();

    public ScoreScreenViewModel( UserControl rootControl )
    {
        ScoreItems.Add( new ScoreItem {PlayerName = "Player 1", Score = 1, TeamColour = "Red"} );
        ScoreItems.Add( new ScoreItem {PlayerName = "Player 1", Score = 1, TeamColour = "LightBlue"} );
        //# These fix the "Tab" key, but not the "Shift + Tab"
        //rootControl.KeyDown += ( sender, args ) => args.Handled = true;
        //rootControl.PreviewKeyDown += ( sender, args ) => args.Handled = true;
    }
}

}
[/code]

Here's the WPF:

[code]
<UserControl
KeyboardNavigation.TabNavigation="None"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="KazBall.Ui.Hud.ScoreScreen"
d:DesignWidth="640" d:DesignHeight="480">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=""/>
<ColumnDefinition Width="
"/>
</Grid.ColumnDefinitions>
<ListView
x:Name="ListView"
Grid.ColumnSpan="2"
ItemsSource="{Binding ScoreItems}">
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn
Header="Player"
Width="{Binding ActualWidth, ElementName=LeftColumn}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock
Text="{Binding PlayerName}"
Foreground="{Binding TeamColour}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn
Header="Score"
Width="{Binding ActualWidth, ElementName=RightColumn}"
DisplayMemberBinding="{Binding Score}"/>
</GridView>
</ListView.View>
</ListView>
<!-- Stupid hack for grid view columns to auto width -->
<Grid Visibility="Hidden">
<Grid Grid.Column="1" x:Name="LeftColumn" />
<Grid Grid.Column="2" x:Name="RightColumn" />
</Grid>
</Grid>
</UserControl>
[/code]

I'd also like to not that it only seems to happen when there are actually items in the list.

Another note:
I tried changing the width of the two columns so that the right-most column is not wide enough to reach the edge of the grid and that stopped it from freaking out. I think it's related to the problem: http://www.noesisengine.com/forums/viewtopic.php?f=3&t=1045

Attached Files
2017-04-07_02-37-10.gif (441,222 bytes)
2017-04-07_02-51-19.gif (840,655 bytes)
PlatformAny

Relationships

related to 0001214 resolvedsfernandez Juggling view of ListView when horizontal scrollbar is shown 

Activities

Issue History

Date Modified Username Field Change
2017-04-07 10:05 XaeroDegreaz New Issue
2017-04-07 10:05 XaeroDegreaz File Added: 2017-04-07_02-37-10.gif
2017-04-07 10:05 XaeroDegreaz File Added: 2017-04-07_02-51-19.gif
2018-01-02 12:53 sfernandez Assigned To => sfernandez
2018-01-02 12:53 sfernandez Status new => assigned
2018-01-02 12:53 sfernandez Relationship added related to 0001214
2018-11-01 02:14 jsantos View Status public => private
2018-11-22 11:32 sfernandez Target Version => 2.2.0
2018-11-22 11:32 sfernandez View Status private => public
2018-11-22 11:32 sfernandez Platform => Any
2018-11-22 11:32 sfernandez Status assigned => resolved
2018-11-22 11:32 sfernandez Resolution open => fixed
2018-11-22 11:32 sfernandez Fixed in Version => 2.2.0b1
2025-10-10 13:29 jsantos Category Unity3D => Unity