This commit is contained in:
Erik 2024-06-18 08:02:56 +02:00
commit f2b84ec28e
2 changed files with 49 additions and 1 deletions

View File

@ -113,7 +113,16 @@
Background="#FF323134"
Foreground="White"
SelectionBrush="#FF6332A0" KeyDown="messageBOX_KeyDown"/>
<Button x:Name="weiterbutton" Click="send_Click" Content="Weiter" Foreground="White" Background="#FF6332A0" BorderThickness="0" Margin="831,643,44,11" BorderBrush="{x:Null}" Style="{StaticResource NoHoverButtonStyle}" RenderTransformOrigin="0.279,0.633"/>
<Button x:Name="weiterbutton" Click="send_Click" Content="Weiter" Foreground="White" Background="#FF6332A0" BorderThickness="0" Margin="831,643,44,11" BorderBrush="{x:Null}" Style="{StaticResource NoHoverButtonStyle}" RenderTransformOrigin="0.279,0.633"/>
<Button Content="⋮" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFF8F8" Margin="847,22,109,602" FontSize="36" Click="ChatFenster_Click"/>
<Popup x:Name="popup" Placement="Center" IsOpen="False" LostFocus="Popup_LostFocus">
<StackPanel Background="White" Orientation="Vertical" Width="200" Height="150" Margin="10">
<Button Content="Button 1" Click="Button1_Click" Margin="5"/>
<Button Content="Button 2" Click="Button2_Click" Margin="5"/>
<Button Content="Button 3" Click="Button3_Click" Margin="5"/>
</StackPanel>
</Popup>

View File

@ -189,6 +189,45 @@ namespace bib_talk
public string IsOnline { get; set; }
}
private void ChatFenster_Click(object sender, RoutedEventArgs e)
{
if(popup.IsOpen = true)
{
popup.Focus();
}
else
{
popup.IsOpen = true;
}
}
private void Button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Button 1 wurde geklickt!");
ClosePopup();
}
private void Button2_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Button 2 wurde geklickt!");
ClosePopup();
}
private void Button3_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Button 3 wurde geklickt!");
ClosePopup();
}
private void Popup_LostFocus(object sender, RoutedEventArgs e)
{
ClosePopup();
}
private void ClosePopup()
{
popup.IsOpen = false;
}
}
}