I have a PopUp element in my XAML, inside this I have a Grid with a TextBlock inside.
The problem is now, that the text and the grid cannot be centered with Horizontal and Vertical Allignment...
XAML:
<Popup x:Name="Popup" Height="30px" VerticalAlignment="Top">
<Grid Height="30px"
Background="Green"
Width="{Binding ActualWidth, ElementName=Popup}">
<TextBlock VerticalAlignment="Center"
HorizontalAlignment="Center"
Foreground="White"
Text="Änderungen wurden übernommen">
</TextBlock>
</Grid>
</Popup>
Preview in Visual Studio (which looks exactly like what I want to do):
Actual Result:
The TextBox inside the green PopUp is not centered as you can see. And I dont know why, maybe I´m missing something, but everything looks fine for me.