Skip to content

Updated NumberBox to use the Width and Height#868

Merged
pomianowski merged 2 commits intolepoco:developmentfrom
syntax-tm:bugfix/numberbox-width-issue
Dec 11, 2023
Merged

Updated NumberBox to use the Width and Height#868
pomianowski merged 2 commits intolepoco:developmentfrom
syntax-tm:bugfix/numberbox-width-issue

Conversation

@syntax-tm
Copy link
Copy Markdown
Contributor

Summary

Updated the NumberBox default style's Template to use the TemplateBinding for the Width and Height properties.

<GroupBox Header="Controls" Margin="10" Padding="10">
    <StackPanel VerticalAlignment="Center">
        <Label Content="Default" />
        <ui:NumberBox />

        <Label Content="Width Set" Margin="0,5,0,0" />
        <ui:NumberBox Width="200" HorizontalAlignment="Left" />

        <Label Content="Height Set" Margin="0,5,0,0" />
        <ui:NumberBox Height="80" />

        <Label Content="Width and Height Set" Margin="0,5,0,0" />
        <ui:NumberBox Height="80" Width="200" HorizontalAlignment="Left" />
    </StackPanel>
</GroupBox>

image

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently setting the Width property of the NumberBox will not do anything.

Issue Number: N/A

What is the new behavior?

You can set the NumberBox Width and Height properties like you would any other control.

Other information

The workaround for me has been to put the NumberBox inside of a StackPanel or whatever else and set the Width of that control which is annoying.

Some parts of the control are only really designed to for the default Height of 24 so as of now the Width property is more practical to set. I would expect the buttons to be centered vertically and the AccentBorder to be the same Height regardless of the control's Height instead of accenting half of the vertical Height.

@pomianowski pomianowski merged commit 0fc59f0 into lepoco:development Dec 11, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants