Mahapps.metro: NumericUpDown UseFloatingWatermark Issue

Created on 20 May 2016  路  12Comments  路  Source: MahApps/MahApps.Metro

What steps will reproduce this issue?

Just add this to Your MetroWindow:

 <Controls:NumericUpDown Value="40"
                                Controls:TextBoxHelper.Watermark="Watermark:"
                                Controls:TextBoxHelper.UseFloatingWatermark="True" />

With those styles:

xaml <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /> <!-- Accent and AppTheme setting --> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" /> </ResourceDictionary.MergedDictionaries>```

Expected outcome

In this case Floating watermark shows only after pressing plus or minus button.
In my opinion it should work like in TextBox (if value !=null then it's visible)...

Environment

  • MahApps.Metro v1.2.4
  • Windows 10
  • Visual Studio 2013 Pro
  • .NET Framework 4.5
Bug

Most helpful comment

THX!

BTW: This project is really nice, good job!

All 12 comments

@AndrzejKl thx for reporting, fixed with 1c6480d647ddb39b2fafd4e28ea157a82a006e88

@punker76 Thx, also TextBoxHelper properties aren't visible in Intelisearch in visual Studio for NumericUpDown, like for TextBoxes. It's possible to fix that, R not?

@AndrzejKl really?

2016-05-20_13h53_54

@punker76 Yes, really:
image

@AndrzejKl Is this v1.2.4 ? Can you try the latest pre-release? (note: my last changes are only available tomorrow)

@punker76 With 1.3.0.153 (via Nuget) it looks like this:
image

Under CleartextButton, are only 2 more properties: "SelectAllOnFocus" and "TextButton"

@AndrzejKl Ah, it's not showing, cause you have the Watermark and UseFloatingWatermark already choosen...

@punker76 Nope:
image

Btw: Maybe here it's a problem. After chose prerelase version, I have in Designer 2 errors:
image

But I can run it without problems...

@AndrzejKl @drunkvs try closing vs, deleting obj/bin folders, reopen your solution and rebuild your stuff...

@punker76 Thx, errors R gone, but still no watermark and other options in InteliSense...

@AndrzejKl Ok, found it, 1.3.0-ALPHA154 (available tomorrow) will contain the fix for it

THX!

BTW: This project is really nice, good job!

Was this page helpful?
0 / 5 - 0 ratings