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

Some fixes in NumericUpDown #2245

Merged
merged 13 commits into from
Dec 22, 2015
Merged

Conversation

michaelmairegger
Copy link
Contributor

@michaelmairegger michaelmairegger changed the title Hexadecimal display in NumericUpDown [WIP] Hexadecimal display in NumericUpDown Dec 2, 2015
…he displayed value is set to MIN/MAX but the bound value remains still invalid.

e.g.

Value = 100 bound to MyValue
MAX changes to 10
displayed value is 10
MyValue is 100.
@michaelmairegger michaelmairegger changed the title [WIP] Hexadecimal display in NumericUpDown [WIP] Some fixes in NumericUpDown Dec 2, 2015
@michaelmairegger
Copy link
Contributor Author

@punker76: I think this can be merged.
I have refactored a bit the TextBoxHelper class to avoid duplicate code. The content in the Files changed tab looks a bit confusing but it should not break anything.
Please double-check if there are any weird behaviors.

private static readonly Func<NumericUpDown, Action> NumericUpDownFocus = control => control.SelectAll;
private static readonly Func<PasswordBox, Action> PasswordBoxFocus = control => control.SelectAll;
private static readonly Func<TextBox, Action> TextBoxFocus = control => control.SelectAll;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xxMUROxx do we really need this static stuff? cause every func is only used once...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punker76 we could also inline this fields. But what do you think of both generic methods? Should simplify further development if we add UseFloatingWatermark for other controls.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what do you think of both generic methods? Should simplify further development if we add UseFloatingWatermark for other controls.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punker76 done

<TranslateTransform />
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
<TextBox x:Name="PART_TextBox"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xxMUROxx can you change the floating message part like in 1919458 ?
thx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punker76 do you mean removing PART_FloatingMessage

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xxMUROxx no, i mean changeing Grid -> ContentControl and the tirgger part

1919458#diff-e09aa3d83a4c174f3c72c7698ff3c40eR124

1919458#diff-e09aa3d83a4c174f3c72c7698ff3c40eR193

punker76 added a commit that referenced this pull request Dec 22, 2015
[WIP] Some fixes in NumericUpDown
@punker76 punker76 merged commit 3fba68e into MahApps:master Dec 22, 2015
@michaelmairegger michaelmairegger changed the title [WIP] Some fixes in NumericUpDown Some fixes in NumericUpDown Dec 22, 2015
@michaelmairegger
Copy link
Contributor Author

@punker76 👍

@michaelmairegger michaelmairegger deleted the hotfix/HexFormat branch January 26, 2016 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants