Page 1 of 1

[SOLVED] PasswordBox.Padding causes Null Reference Exception

Posted: Sun Mar 26, 2017 1:31 pm
by TaterJuice
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

Re: PasswordBox.Padding causes Null Reference Exception

Posted: Mon Mar 27, 2017 12:39 am
by JS-Support @Userware
Hi,

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

Regards,
JS-Support

Re: PasswordBox.Padding causes Null Reference Exception

Posted: Fri Mar 31, 2017 10:36 am
by JS-Support @Userware
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

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

Posted: Mon Apr 03, 2017 8:38 am
by TaterJuice
yayy
/upvote