-
- MarioBarbero
- Posts: 28
- Joined:
WPF controls are pink or transparent
Hello
I dont know why, but some wpf controls are pink in my views. These controls dont have style. The are no necessary.
Why and how ca i solve that?
What is the difference between PasswordBox and Textbox?
PD.: The problem is in PasswordBox control.
My code:
I dont know why, but some wpf controls are pink in my views. These controls dont have style. The are no necessary.
Why and how ca i solve that?
What is the difference between PasswordBox and Textbox?
PD.: The problem is in PasswordBox control.
My code:
Code: Select all
<components:EmailTextBoxControl x:Name="UserNameTextBox"
InputScope="EmailSmtpAddress"
Height="112"
Width="651"
FontSize="32"
Margin="0 0 0 48"
properties:ErrorProperty.IsError="{Binding IsErrorLogin.Value}"
TextPlaceholder="{Binding LocalizationDictionary[$USER].Value}"
Text="{Binding Email.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsValid="{Binding IsEmailValid.Value, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}">
<b:Interaction.Behaviors>
<behaviors:NavigationBehaviour />
</b:Interaction.Behaviors>
<b:Interaction.Triggers>
<b:EventTrigger EventName="LostFocus">
<b:InvokeCommandAction Command="{Binding LostFocusEmailCommand}"
CommandParameter="{Binding ElementName=UserNameTextBox, Path=Text}" />
</b:EventTrigger>
<b:EventTrigger EventName="TextChanged">
<b:InvokeCommandAction Command="{Binding EmailChangedCommand}"
CommandParameter="{Binding ElementName=UserNameTextBox, Path=Text}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</components:EmailTextBoxControl>
<TextBox Text="asassasaasd" FontSize="32"/>
<PasswordBox x:Name="UserPasswordBox"
FontSize="32"
Height="112"
Margin="0 0 0 0"
Password="fbgnbftf" Foreground="White">
<b:Interaction.Behaviors>
<behaviors:PasswordBoxRevealBehavior />
<behaviors:NavigationBehaviour />
</b:Interaction.Behaviors>
<b:Interaction.Triggers>
<b:EventTrigger EventName="PasswordChanged">
<b:InvokeCommandAction Command="{Binding ResetIsErrorLoginCommand}"
CommandParameter="{Binding ElementName=UserPasswordBox}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</PasswordBox>
- Attachments
-
- Error_Pink_Control_WPF.png (32.3 KiB) Viewed 438 times
Re: WPF controls are pink or transparent
A pink indicates that the element doesn't have a default style. What theme are you using in settings?
-
- MarioBarbero
- Posts: 28
- Joined:
Re: WPF controls are pink or transparent
We use Noesis dark blue and it doesnt need style. What do you mean?
And, why this behavior does not happen in TextBox control?
And, why this behavior does not happen in TextBox control?
Re: WPF controls are pink or transparent
Our theme provides a style for the PasswordBox. Are you overriding this somewhere? Perhaps you forgot to inherit from our style using the BasedOn keyword.
Search for this in your project:
Search for this in your project:
Code: Select all
<Style TargetType="PasswordBox">
...
</Style>
-
- MarioBarbero
- Posts: 28
- Joined:
Re: WPF controls are pink or transparent
I dont create style any for PasswordBox control because it is not necessary in my project.
Why TextBox control doesnt have this behavior? Because if you see the attached code in previous post, neither has any style
Why TextBox control doesnt have this behavior? Because if you see the attached code in previous post, neither has any style
Re: WPF controls are pink or transparent
The only explanation we have for this is that you have a style for the PasswordBox defined somewhere.
Are you able to reproduce this behavior in a clean and minimal project? If so, could you please package it and send it to us?
Are you able to reproduce this behavior in a clean and minimal project? If so, could you please package it and send it to us?
-
- KeldorKatarn
- Posts: 234
- Joined:
Re: WPF controls are pink or transparent
I have noticed that under certain circumstances (not 100% able to reliably reproduce) Noesis in Unity can lose the connection to its settings asset. Changing the main resource dictionary sometimes does it, and then any further change has no effect. The solution is deleting the settings file and then creating a new one by using the Settings option from the menu.
That fixes it for me and then any change in Theme is recognized again. no idea exactly why this happens. Just wanted to mention that, since it fits the topic.
Maybe the reason is that the meta file gets messed up and the reference gets lost or something. Not sure how Noesis keeps track of that asset.
That fixes it for me and then any change in Theme is recognized again. no idea exactly why this happens. Just wanted to mention that, since it fits the topic.
Maybe the reason is that the meta file gets messed up and the reference gets lost or something. Not sure how Noesis keeps track of that asset.
Re: WPF controls are pink or transparent
I’d be happy to analyze this in more detail if you can find a way to reproduce it. I’ve tried repeatedly, but I haven’t been able to replicate the issue
-
- KeldorKatarn
- Posts: 234
- Joined:
Re: WPF controls are pink or transparent
Getting the .meta file for the settings messed up by not checking it into source control can be one reason
Re: WPF controls are pink or transparent
That is a user-side mistake, as it changes the GUID of the asset, breaking all previous references.Getting the .meta file for the settings messed up by not checking it into source control can be one reason
Who is online
Users browsing this forum: No registered users and 6 guests