wpf界面右显示块缩进重新设计,逻辑和winform一致,并带有动画效果。v1.7.4
This commit is contained in:
@@ -44,7 +44,7 @@ namespace CommonLibrary
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.7.3");
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.7.4");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -112,11 +112,6 @@
|
||||
<materialDesign:PackIcon Kind="Palette" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="窗口显示" x:Name="MenuItem窗口显示" Click="MenuItem窗口显示_Click">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="KeyboardTab" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="_关于">
|
||||
<MenuItem.Icon>
|
||||
@@ -197,7 +192,7 @@
|
||||
|
||||
<!--右侧的账户信息和登录消息-->
|
||||
<Grid DockPanel.Dock="Right">
|
||||
<Grid Name="MainPageRight" Width="230">
|
||||
<Grid Name="MainPageRight" Width="230" Visibility="Visible">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
@@ -290,6 +285,26 @@
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<!--
|
||||
<TextBlock Margin="0,9,10,0" HorizontalAlignment="Right" Foreground="{DynamicResource PrimaryHueMidForegroundBrush}">>></TextBlock>
|
||||
-->
|
||||
<Grid Margin="0,4,4,0" HorizontalAlignment="Right" MouseDown="packIcon_right_shrink_Click" Cursor="Hand" Background="Transparent">
|
||||
<materialDesign:PackIcon Kind="ChevronDoubleRight" Width="25" Height="25"
|
||||
Name="packIcon_right_shrink"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Name="MainPageRightMini" Visibility="Collapsed" Width="25">
|
||||
<StackPanel>
|
||||
<Grid MouseDown="packIcon_right_restore_Click" Cursor="Hand" Background="Transparent">
|
||||
<materialDesign:PackIcon Kind="ChevronDoubleLeft" Name="packIcon_right_restore" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||
</Grid>
|
||||
<Grid MouseDown="packIcon_right_profile_MouseDown" Cursor="Hand" Background="Transparent">
|
||||
<materialDesign:PackIcon Kind="Account" Name="packIcon_right_profile" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||
</Grid>
|
||||
<Grid MouseDown="packIcon_right_file_MouseDown" Cursor="Hand" Background="Transparent">
|
||||
<materialDesign:PackIcon Kind="FileCloud" Name="packIcon_right_file" MouseDown="packIcon_right_file_MouseDown" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -412,17 +412,6 @@ namespace 软件系统客户端Wpf
|
||||
}
|
||||
}
|
||||
|
||||
private void MenuItem窗口显示_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MainPageRight.Visibility != Visibility.Collapsed)
|
||||
{
|
||||
MainPageRight.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
MainPageRight.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -828,6 +817,8 @@ namespace 软件系统客户端Wpf
|
||||
#endregion
|
||||
|
||||
|
||||
#region User Interface
|
||||
|
||||
|
||||
/**********************************************************************************************
|
||||
*
|
||||
@@ -836,6 +827,8 @@ namespace 软件系统客户端Wpf
|
||||
**********************************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
private void Button_BackMain_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//点击了主页
|
||||
@@ -849,7 +842,43 @@ namespace 软件系统客户端Wpf
|
||||
await Task.Delay(2000);
|
||||
DialogHostWait.IsOpen = false;
|
||||
}
|
||||
private void packIcon_right_profile_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
// 点击我的信息
|
||||
MenuItem我的信息_Click(sender, null);
|
||||
}
|
||||
|
||||
private void packIcon_right_file_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
// 点击共享文件
|
||||
Border_MouseLeftButtonDown(sender, e);
|
||||
}
|
||||
|
||||
|
||||
private void packIcon_right_shrink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DoubleAnimation doubleAnimation = new DoubleAnimation(
|
||||
25, new Duration(TimeSpan.FromMilliseconds(300)));
|
||||
doubleAnimation.Completed += DoubleAnimation_Completed;
|
||||
MainPageRight.BeginAnimation(WidthProperty, doubleAnimation);
|
||||
}
|
||||
|
||||
private void DoubleAnimation_Completed(object sender, EventArgs e)
|
||||
{
|
||||
MainPageRightMini.Visibility = Visibility.Visible;
|
||||
MainPageRight.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void packIcon_right_restore_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DoubleAnimation doubleAnimation = new DoubleAnimation(
|
||||
25, 230, new Duration(TimeSpan.FromMilliseconds(300)));
|
||||
MainPageRight.Visibility = Visibility.Visible;
|
||||
MainPageRightMini.Visibility = Visibility.Collapsed;
|
||||
MainPageRight.BeginAnimation(WidthProperty, doubleAnimation);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user