Create Popup in WPF and C#

Declaring a Popup control, the Quick and Dirty way

<Popup x:Name="PopupTest" AllowsTransparency="True">
<Viewbox VerticalAlignment="Top">
<TextBlock Text="Wow, that was easy!"/>

Showing the Popup control

void Window_MouseEnter(object sender, MouseEventArgs e)
    PopupTest.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;
    PopupTest.StaysOpen = false;
    PopupTest.Height = 1000;
    PopupTest.Width = 500;
    PopupTest.IsOpen = true;

source: roecode keywords:

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

%d blogger menyukai ini: