<UserControl x:Class="PipeGallery.View.MenuView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="768" d:DesignWidth="1366" Background="#c8000000" mc:Ignorable="d"> <Grid> <Viewbox> <Grid Width="1366" Height="768"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="100" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid> <StackPanel Margin="130,0,0,0" Orientation="Horizontal"> <Grid Margin="0,5,0,4" VerticalAlignment="Bottom"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock VerticalAlignment="Bottom" FontSize="24" Foreground="#ffffff" Text="菜单" /> <TextBlock Grid.Row="1" VerticalAlignment="Top" FontSize="16" Foreground="#bbbbbb" Text="menu" /> </Grid> </StackPanel> </Grid> <Grid Grid.Row="1"> <Border Width="1254" Height="630" VerticalAlignment="Top"> <Border.Background> <ImageBrush ImageSource="/PipeGallery;component/Image/menu_frame.png" /> </Border.Background> <ListBox x:Name="lbxMenu" Margin="30,50" HorizontalAlignment="Center" VerticalAlignment="Top" ItemContainerStyle="{StaticResource ListBoxItemStyle}" ItemsSource="{Binding MenuInfos}"> <ListBox.ItemTemplate> <DataTemplate> <Border x:Name="bdrMain" Width="150" Height="150"> <Grid Background="Transparent" DataContext="{Binding}" PreviewMouseDown="rb_PreviewMouseDown"> <Grid.RowDefinitions> <RowDefinition Height="2*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Image x:Name="imgSelected" Width="74" Height="60" Source="/PipeGallery;component/Image/cd.png" /> <TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="28" Foreground="#fefefe" Text="{Binding Name}" /> </Grid> </Border> </DataTemplate> </ListBox.ItemTemplate> <ListBox.Template> <ControlTemplate TargetType="{x:Type ListBox}"> <Grid VerticalAlignment="Top" Background="Transparent"> <ScrollViewer HorizontalScrollBarVisibility="Hidden"> <WrapPanel Width="1120" HorizontalAlignment="Center" IsItemsHost="True" /> </ScrollViewer> </Grid> </ControlTemplate> </ListBox.Template> </ListBox> </Border> <Button x:Name="btnReturn" Margin="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource BtnCloseStyle3}" /> </Grid> </Grid> </Grid> </Viewbox> </Grid> </UserControl>