• johnson:silverlight主界面的设计


    <Grid x:Name="LayoutRoot" Background="White">
    <Grid Background="#FFE2F3F9">
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto" MinHeight="42.667"></RowDefinition>
    <RowDefinition Height="Auto" MinHeight="26"></RowDefinition>
    <RowDefinition/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto"></ColumnDefinition>
    <ColumnDefinition Width="*"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <Grid Grid.ColumnSpan="2" Height="70" VerticalAlignment="Top" Grid.RowSpan="3" Margin="5">
    <!--<Image Margin="115,14,0,0" Source="./Images/logo.png" HorizontalAlignment="Left" Width="70" />
    <TextBlock Margin="193,14,-75,0" TextWrapping="Wrap" Text="人力资源外包服务平台" FontSize="16" Foreground="#FF004FB8" VerticalAlignment="Bottom"/>
    <Image Source="./Images/dalogo.png" Stretch="Fill" Margin="11,8,0,-1" HorizontalAlignment="Left" Width="81"/>-->
    <Image Source="./Images/topmenu_bg.png" Stretch="Fill"/>
    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,0,20,0">
    <Border BorderThickness="1" Name="bdUp">
    <Image x:Name="imWpUpdate" Source="./Images/pw.png" Height="38" Stretch="None" Margin="0,0,10,0"/>
    </Border>
    <Border BorderThickness="1" Name="bdCancel">
    <Image x:Name="imCancel" Source="./Images/cancel.png" Height="38" Stretch="None" />
    </Border>
    </StackPanel>
    </Grid>
    <!--<Grid Grid.ColumnSpan="2" Grid.Row="1" Height="26">
    <Image Source="./Images/topmenu_bg.png" Stretch="Fill"/>
    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,0,20,0">
    <Image x:Name="imUser" Source="./Images/men.png" Stretch="None" Height="20"/>
    <TextBlock x:Name="tbUser" Opacity="0.5" Margin="0,5,5,5" TextAlignment="Left" Foreground="Black"/>
    <Image x:Name="imCustomer" Source="./Images/do_split.png" Stretch="None" Height="20" />
    <TextBlock x:Name="tbCustomer" Opacity="0.5" Margin="5,5,10,5" TextAlignment="Left" Foreground="Black"/>
    <Image x:Name="imTime" Source="./Images/time.png" Stretch="None" Height="20"/>
    <TextBlock x:Name="tbTime" Opacity="0.5" TextAlignment="Left" Foreground="Black" VerticalAlignment="Center"/>
    </StackPanel>
    </Grid>-->
    <Grid Grid.Row="2" Grid.Column="0" Margin="5,5,0,5">
    <Border x:Name="leftPanel" Width="170" BorderThickness="1,0,0,1">
    <Border.BorderBrush>
    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF007DCF" Offset="0"/>
    <GradientStop Color="#FFA9DDFF" Offset="0.61"/>
    </LinearGradientBrush>
    </Border.BorderBrush>
    <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto"></RowDefinition>
    <RowDefinition Height="Auto"></RowDefinition>
    <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>
    <Grid Height="26" Grid.Row="0">
    <Image Source="Images/MenuBackGroud.png" Stretch="Fill"/>
    <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="13" Margin="8,3,6,3" Foreground="White">模块导航</TextBlock>
    <Image x:Name="expand" Source="Images/MenuShow.png" Stretch="None" Margin="3" HorizontalAlignment="Right" Opacity="0"/>
    <Image x:Name="collapse" Source="Images/MenuHide.png" Stretch="None" Margin="0,3,3,3" HorizontalAlignment="Right" Opacity="1" Cursor="Hand"/>
    </Grid>
    <Border Height="1" Grid.Row="1" Background="#99bbe8" />
    <Grid Grid.Row="2" Background="White" x:Name="leftMenuPanel">
    <StackPanel Orientation="Vertical">
    <Button Content="ModuleA" Height="36" HorizontalAlignment="Left" Name="button1" VerticalAlignment="Top" Width="170"
    Tag="ModuleA"/>
    <Button Content="ModuleB" Height="36" HorizontalAlignment="Left" Name="button2" VerticalAlignment="Top" Width="170"
    Tag="ModuleB"/>
    <Button Content="ModuleC" Height="36" HorizontalAlignment="Left" Name="button3" VerticalAlignment="Top" Width="170"
    Tag="ModuleC"/>
    </StackPanel>
    </Grid>
    </Grid>
    </Border>
    </Grid>
    <Grid Grid.Row="2" Grid.Column="1" Margin="0,5,5,5">
    <Border x:Name="rightPanel" BorderThickness="1">
    <Border.BorderBrush>
    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF007DCF" Offset="0"/>
    <GradientStop Color="#FFA9DDFF" Offset="0.6"/>
    </LinearGradientBrush>
    </Border.BorderBrush>
    <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto"></RowDefinition>
    <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>

    <ScrollViewer Grid.Row="1" Width="Auto" Height="Auto" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" BorderThickness="0">
    <Grid x:Name="rightContent">
    <sdk:TabControl x:Name="tabControl" Background="#dfe8f6" BorderThickness="0" />
    </Grid>
    </ScrollViewer>
    </Grid>
    </Border>
    </Grid>
    </Grid>
    </Grid>
    <UserControl.Resources>
    <Storyboard x:Name="hideMenu">
    <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="26" Duration="0:0:0.3"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="leftMenuPanel" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.2"></DoubleAnimation>
    </Storyboard>
    <Storyboard x:Name="showMenu">
    <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="170" Duration="0:0:0.3"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
    <DoubleAnimation Storyboard.TargetName="leftMenuPanel" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"></DoubleAnimation>
    </Storyboard>
    </UserControl.Resources>

  • 相关阅读:
    【转】可见性、原子性和有序性问题:并发编程Bug的源头
    实例详解 Java 死锁与破解死锁
    flutter 网络权限配置
    sqlserver pandas 日期
    Rust中mut, &, &mut的区别
    flutter, 在当前页刷新前一页
    django设置debug=false时静态文件丢失
    flutter dialog刷新
    pandas > polars
    python 读pdf
  • 原文地址:https://www.cnblogs.com/iwangjun/p/2381083.html
Copyright © 2020-2023  润新知