Invisible strings in combobox after obfuscation
anders.isacson
Posts: 12 Bronze 2
I have two WPF comboboxes that show texts before obfuscation but not afterwards. It is still possible to select elements in it, either scrolling down the list of invisible elements or by entering the first letter of an element. The selected element can then be displayed as visible text in an other control. Other comboboxes in the same software work just fine.
Here is how it looks in the xaml code for one of these comboboxes (with images added for test purposes. They are shown correctly but no text.):
Here is how it looks in the xaml code for one of these comboboxes (with images added for test purposes. They are shown correctly but no text.):
<ComboBox Style="{StaticResource MyComboBoxText}" DockPanel.Dock="Right"
ItemsSource="{Binding Path=Materials}"
SelectedItem="{Binding Path=SelectedMaterial}">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Style="{StaticResource GrayableButtonImage}"
Source="/HotDiskResources;component/Images/Grafik_Low_Density_Highly_Insulating_Module.png" />
<TextBlock Style="{StaticResource MyTextBlock}"
Text="{Binding Path=Name, Converter={StaticResource ObjectToLocalizedStringConverter}}" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
The second problematic combobox code is:
The second problematic combobox code is:
<ComboBox Style="{StaticResource MyComboBoxText}" DockPanel.Dock="Right"
ItemsSource="{Binding Path=UserMaterials}"
SelectedItem="{Binding Path=SelectedUserMaterial}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Style="{StaticResource MyTextBlock}" Text="{Binding Path=Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="ToolTip">
<Setter.Value>
<TextBlock Text="{Binding Path=Tooltip}" />
</Setter.Value>
</Setter>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>