Skip to content

RunningBlock 的两个bug:设置speed崩溃、控件整体尺寸变化时不会刷新滚动 #901

@eijjxx

Description

@eijjxx

Describe the bug
1、当设置speed的时候,会弹出错误
2、在外框尺寸发生变化的时候不会UpdateContent

To Reproduce
Steps to reproduce the behavior:
1、代码:

<hc:RunningBlock
    Width="100"
    Margin="0,16,0,0"
    HorizontalAlignment="Left"
    AutoReverse="True"
    AutoRun="True"
    Content="test test test test test test test test test test"
    Runaway="False"
    Speed="200" />

当runaway为false的时候设置speed会崩溃,应该是UpdateContent的TimeSpan.FromSeconds((to-from)/Speed)这里to-from为负导致

2、window中只放置

<hc:RunningBlock
  Margin="0,16,0,0"
  HorizontalAlignment="Stretch"
  VerticalAlignment="Top"
  AutoReverse="True"
  AutoRun="True"
  Content="test test test test test test test test test test"
  Runaway="False" />

拖动缩放window的时候滚动状态不会改变
期望当autorun=True的时候,如果整体尺寸发生变化,也会刷新是否开始滚动
建议在RunningBlock的SizeChange中也添加UpdateContent

Environment (please complete the following information):

  • .net: [e.g. 4.5.2]
  • IDE [e.g. vs2019]
  • Version [e.g. 3.2.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions