daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Jan 11th, 2019 6 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Window x:Class="WpfTemplateWithMaterialDesign.MainWindow"
  2.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.         xmlns:local="clr-namespace:WpfTemplateWithMaterialDesign"
  7.         xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8.         mc:Ignorable="d" Height="600" Width="1080" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" WindowStyle="None" Foreground="White">
  9.     <Window.Resources>
  10.         <Storyboard x:Key="MenuOpen">
  11.             <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
  12.                 <EasingDoubleKeyFrame KeyTime="0" Value="60" />
  13.                 <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="200" />
  14.             </DoubleAnimationUsingKeyFrames>
  15.         </Storyboard>
  16.         <Storyboard x:Key="MenuClose">
  17.             <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
  18.                 <EasingDoubleKeyFrame KeyTime="0" Value="200" />
  19.                 <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="60" />
  20.             </DoubleAnimationUsingKeyFrames>
  21.         </Storyboard>
  22.     </Window.Resources>
  23.  
  24.     <Window.Triggers>
  25.         <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonOpenMenu">
  26.             <BeginStoryboard Storyboard="{StaticResource MenuOpen}"/>
  27.         </EventTrigger>
  28.         <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonCloseMenu">
  29.             <BeginStoryboard Storyboard="{StaticResource MenuClose}"/>
  30.         </EventTrigger>
  31.     </Window.Triggers>
  32.    
  33.     <Grid Background="LightGray">
  34.         <Grid Height="30" VerticalAlignment="Top" Background="#6200EE">
  35.             <Grid Width="888" HorizontalAlignment="Left" Margin="60 0 0 0" MouseDown="Grid_MouseDown"/>
  36.             <TextBlock Text="WPF Template" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  37.             <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right">
  38.                 <TextBlock Text="Account Name" VerticalAlignment="Center" FontSize="14"/>
  39.                 <materialDesign:PopupBox Margin="3" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
  40.                     <StackPanel Width="150">
  41.                         <Button Content="Account" />
  42.                         <Button Content="Settings" />
  43.                         <Button Content="Help" />
  44.                         <Separator/>
  45.                         <Button x:Name="ButtonPopUpLogout" Content="Logout" Click="ButtonPopUpLogout_Click"/>
  46.                     </StackPanel>
  47.                 </materialDesign:PopupBox>
  48.             </StackPanel>
  49.         </Grid>
  50.         <Grid x:Name="GridMenu" Width="60" HorizontalAlignment="Left" Background="#3700B3">
  51.             <StackPanel>
  52.             <Grid Height="30" Background="White">
  53.                     <Button x:Name="ButtonCloseMenu" Width="60" Height="30" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="Collapsed" Click="ButtonCloseMenu_Click">
  54.                         <materialDesign:PackIcon Foreground="#3700B3" Kind="ArrowLeft" Width="20" Height="20"/>
  55.                     </Button>
  56.                     <Button x:Name="ButtonOpenMenu" Width="60" Height="30" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Click="ButtonOpenMenu_Click">
  57.                         <materialDesign:PackIcon Foreground="#3700B3" Kind="Menu" Width="20" Height="20"/>
  58.                     </Button>
  59.                 </Grid>
  60.                 <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="White">
  61.                     <ListViewItem Height="60">
  62.                         <StackPanel Orientation="Horizontal">
  63.                             <materialDesign:PackIcon Kind="ViewDashboard" Margin="10" Width="25" Height="25" VerticalAlignment="Center"/>
  64.                             <TextBlock Text="Home" VerticalAlignment="Center" Margin="20 10"/>
  65.                         </StackPanel>
  66.                     </ListViewItem>
  67.                     <ListViewItem Height="60">
  68.                         <StackPanel Orientation="Horizontal">
  69.                             <materialDesign:PackIcon Kind="Pencil" Margin="10" Width="25" Height="25" VerticalAlignment="Center"/>
  70.                             <TextBlock Text="Create" VerticalAlignment="Center" Margin="20 10"/>
  71.                         </StackPanel>
  72.                     </ListViewItem>
  73.                     <ListViewItem Height="60">
  74.                         <StackPanel Orientation="Horizontal">
  75.                             <materialDesign:PackIcon Kind="Ticket" Margin="10" Width="25" Height="25" VerticalAlignment="Center"/>
  76.                             <TextBlock Text="Tickets" VerticalAlignment="Center" Margin="20 10"/>
  77.                         </StackPanel>
  78.                     </ListViewItem>
  79.                     <ListViewItem Height="60">
  80.                         <StackPanel Orientation="Horizontal">
  81.                             <materialDesign:PackIcon Kind="Message" Margin="10" Width="25" Height="25" VerticalAlignment="Center"/>
  82.                             <TextBlock Text="Message" VerticalAlignment="Center" Margin="20 10"/>
  83.                         </StackPanel>
  84.                     </ListViewItem>
  85.                     <ListViewItem Height="60">
  86.                         <StackPanel Orientation="Horizontal">
  87.                             <materialDesign:PackIcon Kind="GithubBox" Margin="10" Width="25" Height="25" VerticalAlignment="Center"/>
  88.                             <TextBlock Text="GitHub" VerticalAlignment="Center" Margin="20 10"/>
  89.                         </StackPanel>
  90.                     </ListViewItem>
  91.                 </ListView>
  92.             </StackPanel>
  93.         </Grid>
  94.     </Grid>
  95. </Window>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top