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: