You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
4.5 KiB
79 lines
4.5 KiB
<c:BWindow x:Class="BBWYB.Client.Views.MainWindow"
|
|
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls"
|
|
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"
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:BBWYB.Client.Views"
|
|
DataContext="{Binding Main,Source={StaticResource Locator}}"
|
|
mc:Ignorable="d"
|
|
Style="{StaticResource bwstyle}"
|
|
Title="{Binding GlobalContext.User.Shop.ShopName,StringFormat=步步为盈 \{0\}}" Height="450" Width="800">
|
|
<b:Interaction.Triggers>
|
|
<b:EventTrigger EventName="Closing">
|
|
<b:InvokeCommandAction Command="{Binding ClosingCommand}" PassEventArgsToCommand="True"/>
|
|
</b:EventTrigger>
|
|
</b:Interaction.Triggers>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0">
|
|
<TextBlock Text="{Binding GlobalContext.User.Name}"/>
|
|
<TextBlock Text="{Binding GlobalContext.User.Shop.ShopName}" Margin="5,0,0,0"/>
|
|
<TextBlock Text="v10000" Margin="5,0,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="150"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<ListBox x:Name="listbox_menu" ItemsSource="{Binding MenuList}"
|
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
|
|
Background="{StaticResource MainMenu.BackGround}"
|
|
Foreground="{StaticResource Text.Color}"
|
|
BorderThickness="0,0,1,0"
|
|
BorderBrush="{StaticResource MainMenu.BorderBrush}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Width="{Binding ActualWidth,ElementName=listbox_menu}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{Binding Name}" Margin="10,5,0,5"/>
|
|
<ListBox ItemsSource="{Binding ChildList}"
|
|
SelectedItem="{Binding DataContext.SelectedMenuModel,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
|
|
Grid.Row="1"
|
|
Foreground="#4A4A4A">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem" BasedOn="{StaticResource DefaultListBoxItemStyle}">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Name}" Margin="20,5,0,5" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<c:BButton Content="切换店铺" VerticalAlignment="Bottom" HorizontalAlignment="Left" Style="{StaticResource LinkButton}" Panel.ZIndex="1" Margin="5,0,0,5"
|
|
Visibility="{Binding ShowShopChoosePanel,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"
|
|
Command="{Binding OpenSelectShopCommand}"/>
|
|
|
|
<Frame x:Name="frame" Navigated="frame_Navigated" NavigationUIVisibility="Hidden"
|
|
Source="{Binding SelectedMenuModel.Url}"
|
|
Grid.Column="1"/>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</c:BWindow>
|
|
|