views:

26

answers:

0

I have a custom login usercontrol that has a normal textbox and a passwordbox.

Blend refuses to cooperate with the passwordbox saying that "DP.UnsetValue" is not valid for PasswordChar property. However the project compiles and runs fine in blend or in VS2010. The cider designer in vs2010 doesn't seem to mind the error because it actually renders my usercontrol for design time configuration.

Normally when I get one of these errors there is an innerexception with a path to the file/resource missing. That's not the case here and i'm not sure how to figure out how to fix it for when this comes up in the future.

I swapped the tags to turn the passwordbox into a normal textbox and it seems to be fine with that, however i need the input masking that passwordbox provides. It's not very practical to comment out that object and finish styling my control in blend.

here's my xaml:

 <PasswordBox x:Name="PasswordTextbox" PasswordChar="*" Height="26" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" Margin="5" RenderTransformOrigin="0.5,0.5" TabIndex="3">
                <PasswordBox.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                    </TransformGroup>
                </PasswordBox.RenderTransform>
                <PasswordBox.Effect>
                    <DropShadowEffect />
                </PasswordBox.Effect>
                <PasswordBox.Triggers>
                    <EventTrigger RoutedEvent="UIElement.GotFocus">
                        <BeginStoryboard Storyboard="{StaticResource StoryboardScaleUpFontIncrease}"/>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="UIElement.LostFocus">
                        <BeginStoryboard Storyboard="{DynamicResource StoryboardScaleNormalFontNormal}"/>
                    </EventTrigger>
                </PasswordBox.Triggers>
            </PasswordBox>

Does anyone know how to debug this behavior?