added some practice examples
This commit is contained in:
25
20241107/WpfApp2/View/UserControls/MenuBar.xaml
Normal file
25
20241107/WpfApp2/View/UserControls/MenuBar.xaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<UserControl x:Class="WpfApp2.View.UserControls.MenuBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:WpfApp2.View.UserControls"
|
||||
mc:Ignorable="d"
|
||||
Height="70" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="40"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Menu Grid.Row="0">
|
||||
<MenuItem Header="File" FontSize="16">
|
||||
<MenuItem Header="Exit" Name="exit"></MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Edit" FontSize="16"></MenuItem>
|
||||
</Menu>
|
||||
|
||||
<Button Width="50" Height="25" VerticalAlignment="Center" Grid.Row="1"></Button>
|
||||
<TextBox Width="250" Grid.Row="1" Height="30" HorizontalAlignment="Left"></TextBox>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
20241107/WpfApp2/View/UserControls/MenuBar.xaml.cs
Normal file
28
20241107/WpfApp2/View/UserControls/MenuBar.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WpfApp2.View.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MenuBar.xaml
|
||||
/// </summary>
|
||||
public partial class MenuBar : UserControl
|
||||
{
|
||||
public MenuBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user