Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated NumberBox to use the Width and Height #868

Merged

Conversation

syntax-tm
Copy link
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
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants