[SOLVED] PasswordBox.Padding causes Null Reference Exception

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
TaterJuice
Posts: 147
Joined: Thu Mar 16, 2017 5:40 am
Contact:

[SOLVED] PasswordBox.Padding causes Null Reference Exception

Postby TaterJuice » Sun Mar 26, 2017 1:31 pm

Using the "Padding" property on the XAML class "PasswordBox" causes a Null Reference Exception,

Code: Select all

<PasswordBox Padding="1">


with the following StackTrace:

{"Object reference not set to an instance of an object."}
at DotNetForHtml5.Core.INTERNAL_HtmlDomManager.GetDomElementStyleForModification(Object domElementRef)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , Type , Object )
at Windows.UI.Xaml.Controls.Control.Padding_MethodToUpdateDom(DependencyObject d, Object newValue)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.RenderElementsAndRaiseChangedEventOnAllDependencyProperties(DependencyObject dependencyObject)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Panel.ManageChildrenChanged(DependencyObject d, UIElementCollection oldChildren, UIElementCollection newChildren)
at Windows.UI.Xaml.Controls.Panel.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Panel.ManageChildrenChanged(DependencyObject d, UIElementCollection oldChildren, UIElementCollection newChildren)
at Windows.UI.Xaml.Controls.Panel.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Panel.ManageChildrenChanged(DependencyObject d, UIElementCollection oldChildren, UIElementCollection newChildren)
at Windows.UI.Xaml.Controls.Panel.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Border.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Border.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.Panel.ManageChildrenChanged(DependencyObject d, UIElementCollection oldChildren, UIElementCollection newChildren)
at Windows.UI.Xaml.Controls.Panel.INTERNAL_OnAttachedToVisualTree()
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Controls.UserControl.Content_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.RenderElementsAndRaiseChangedEventOnAllDependencyProperties(DependencyObject dependencyObject)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChild_Private(UIElement child, UIElement parent)
at DotNetForHtml5.Core.INTERNAL_VisualTreeManager.AttachVisualChildIfNotAlreadyAttached(UIElement child, UIElement parent)
at Windows.UI.Xaml.Window.set_Content(UIElement value)
at Test1.App..ctor() in C:\Dev\Tests\Test1\Test1\App.xaml.cs:line 17


Additionally, the default Sytyling of the PasswordBox has different inner padding, right margin, caret placement and overall height and width than the default styling of the TextBox. I've found it cumbersome, even difficult at times, to make them size proportionally to each other, especially without access to the PasswordBox.Padding property. See screenshot below:

Image

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: PasswordBox.Padding causes Null Reference Exception

Postby JS-Support @Userware » Mon Mar 27, 2017 12:39 am

Hi,

Thanks a lot for reporting this issue. We are going to fix it as soon as possible.

Regards,
JS-Support

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: PasswordBox.Padding causes Null Reference Exception

Postby JS-Support @Userware » Fri Mar 31, 2017 10:36 am

Hi,

The issue has now been fixed in Beta 11.1, available at:
http://forums.cshtml5.com/viewforum.php?f=6

Thanks.
Regards,
JS-Support

TaterJuice
Posts: 147
Joined: Thu Mar 16, 2017 5:40 am
Contact:

Re: [SOLVED] PasswordBox.Padding causes Null Reference Exception

Postby TaterJuice » Mon Apr 03, 2017 8:38 am

yayy
/upvote


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 24 guests

 

 

cron