Untitled
unknown
plain_text
a year ago
1.1 kB
5
Indexable
<Window x:Class="YourNamespace.AboutDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="About" Height="200" Width="300"> <Grid> <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> <TextBlock Text="Your Application Name" FontSize="18" FontWeight="Bold" Margin="0,0,0,10"/> <TextBlock Text="Version 1.0" Margin="0,0,0,10"/> <TextBlock Text="Copyright © 2024 Your Company" Margin="0,0,0,10"/> <Button Content="Close" Width="80" Height="30" Click="CloseButton_Click"/> </StackPanel> </Grid> </Window> using System.Windows; namespace YourNamespace { public partial class AboutDialog : Window { public AboutDialog() { InitializeComponent(); } private void CloseButton_Click(object sender, RoutedEventArgs e) { Close(); } } } private void ShowAboutDialog() { AboutDialog aboutDialog = new AboutDialog(); aboutDialog.ShowDialog(); }
Editor is loading...
Leave a Comment