WPF popup location issue
wpf, xaml
Solution
The left and right alignment of menus and popups appears to be controlled by this special registry key:
`HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows`
`REG_SZ: MenuDropAlignment`
`Value: 0` means to the right
`Value: 1` means to the left
Somehow my system switched the menu and popup alignment from right to left. I checked this registry key and sure enough the value was 1 so I changed it back to 0 and now my WPF Popup alignments are working as expected.
Problem
I am experiencing a strange WPF popup placement issue. I have defined this XAML: ``` <Window x:Class="PositionBug.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="300" Width="525"> <Grid> <TextBlock Name="Textblock1" Height="60" Width="300" Background="LightGray" HorizontalAlignment="Center" VerticalAlignment="Bottom">The PlacementTarget</TextBlock> <Popup Name="Popup1" PlacementTarget="{Binding ElementName=Textblock1}" Placement="Top" Width="120" Margin="198,0,199,0" IsOpen="True"> <TextBlock Background="LightBlue" FontSize="18">This is a Popup</TextBlock> </Popup> </Grid> ``` On most computers this is the result, as expected: However, on multiple units of one specific computer model, the result is presented like this: Is there any way to force Placement to both Top AND Left?