步步为盈
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.

115 lines
7.0 KiB

<c:BWindow x:Class="BBWY.Client.Views.MainWindow"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.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:BBWY.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.TeamName}" Margin="5,0,0,0"/>
<TextBlock Text="{Binding GlobalContext.User.Shop.Platform}" Margin="5,0,0,0"/>-->
<TextBlock Text="{Binding GlobalContext.User.Shop.ShopName}" Margin="5,0,0,0"/>
<TextBlock Text="v10085" 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.ColumnSpan="2" Background="{StaticResource Border.Background}"
Visibility="{Binding ShowShopChoosePanel,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="请选择一个店铺" VerticalAlignment="Center" FontWeight="Bold" FontSize="20"/>
<ListBox ItemsSource="{Binding ShopList}" Grid.Row="1"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
Style="{StaticResource NoScrollViewListBoxStyle}">
<ListBox.ItemTemplate>
<DataTemplate>
<c:BButton Content="{Binding Name}"
Background="Transparent"
Foreground="{StaticResource Text.Color}"
FontSize="14"
MouseOverBgColor="{StaticResource Button.Selected.Background}"
MouseOverFontColor="White"
Padding="5,0"
Command="{Binding DataContext.ChooseShopCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>-->
<Grid Grid.ColumnSpan="2" Background="{StaticResource Border.Background}"
Visibility="{Binding ShowWB2RuntimeDownloadPanel,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}">
<c:RoundWaitProgress Play="{Binding ShowWB2RuntimeDownloadPanel}"
WaitText="{Binding Wb2DownloadProgress,Mode=OneWay,UpdateSourceTrigger=PropertyChanged,StringFormat=正在下载Webview2Runtime \{0\}%}"/>
</Grid>
</Grid>
</Grid>
</c:BWindow>