<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366" Background="#c8000000"> <Grid> <Viewbox> <Grid Width="1366" Height="768"> <Grid > <Grid.RowDefinitions> <RowDefinition Height="100"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid> <StackPanel Orientation="Horizontal" Margin="130,0,0,0"> <Grid VerticalAlignment="Bottom" Margin="0,5,0,4"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <TextBlock Text="菜单" Foreground="#ffffff" FontSize="24" VerticalAlignment="Bottom"/> <TextBlock Text="menu" Grid.Row="1" Foreground="#bbbbbb" FontSize="16" VerticalAlignment="Top"/> </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" ItemsSource="{Binding MenuInfos}" ItemContainerStyle="{StaticResource ListBoxItemStyle}"> <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 Text="{Binding Name}" Grid.Row="1" HorizontalAlignment="Center" Foreground="#fefefe" FontSize="28" VerticalAlignment="Top"/> </Grid > </Border> </DataTemplate> </ListBox.ItemTemplate> <ListBox.Template> <ControlTemplate TargetType="{x:Type ListBox}"> <Grid Background="Transparent" VerticalAlignment="Top" > <ScrollViewer HorizontalScrollBarVisibility="Hidden"> <WrapPanel Width="1120" HorizontalAlignment="Center" IsItemsHost="True"/> </ScrollViewer> </Grid> </ControlTemplate> </ListBox.Template> </ListBox> </Border> <Button x:Name="btnReturn" HorizontalAlignment="Right" Margin="10" VerticalAlignment="Bottom" Style="{StaticResource BtnCloseStyle3}" /> </Grid> </Grid> </Grid> </Viewbox> </Grid> </UserControl>