|
| 1 | +<UserControl x:Class="MaterialDesignColors.WpfExample.Home" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf" |
| 7 | + mc:Ignorable="d" |
| 8 | + d:DesignHeight="300" d:DesignWidth="300"> |
| 9 | + <Grid> |
| 10 | + <Grid.RowDefinitions> |
| 11 | + <RowDefinition Height="Auto" /> |
| 12 | + <RowDefinition Height="*" /> |
| 13 | + </Grid.RowDefinitions> |
| 14 | + <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Margin="16"> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + <ColumnDefinition Width="Auto" /> |
| 17 | + <ColumnDefinition Width="*" /> |
| 18 | + </Grid.ColumnDefinitions> |
| 19 | + <Image Source="Resources/ms-icon-310x310.png" Stretch="Uniform" Width="100" Height="100" /> |
| 20 | + <StackPanel Grid.Column="1" Margin="24 0 0 0"> |
| 21 | + <TextBlock FontSize="32" TextWrapping="Wrap">Welcome to Material Design In XAML Toolkit</TextBlock> |
| 22 | + <TextBlock Margin="0 8 0 0" TextWrapping="Wrap" Foreground="{DynamicResource MaterialDesignBodyLight}">Use the left-hand menu to checkout the various controls & themes.</TextBlock> |
| 23 | + </StackPanel> |
| 24 | + </Grid> |
| 25 | + <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" |
| 26 | + HorizontalAlignment="Center" |
| 27 | + VerticalAlignment="Bottom" |
| 28 | + Margin="0 0 0 32"> |
| 29 | + <StackPanel Orientation="Horizontal"> |
| 30 | + <wpf:Card Width="420" VerticalAlignment="Top" Margin="4 2 8 16" Height="280"> |
| 31 | + <Grid VerticalAlignment="Stretch" > |
| 32 | + <Grid.RowDefinitions> |
| 33 | + <RowDefinition Height="Auto" /> |
| 34 | + <RowDefinition Height="Auto" /> |
| 35 | + <RowDefinition Height="Auto" /> |
| 36 | + <RowDefinition Height="Auto" /> |
| 37 | + </Grid.RowDefinitions> |
| 38 | + <Grid.ColumnDefinitions> |
| 39 | + <ColumnDefinition Width="200" /> |
| 40 | + <ColumnDefinition Width="*" /> |
| 41 | + </Grid.ColumnDefinitions> |
| 42 | + <Image Source="Resources/Contact.png" Grid.RowSpan="4" StretchDirection="Both" VerticalAlignment="Stretch" Stretch="UniformToFill" /> |
| 43 | + <TextBlock Grid.Column="1" FontSize="28" Margin="16 16 16 8" FontWeight="Light">Get In Touch</TextBlock> |
| 44 | + <TextBlock Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}" |
| 45 | + VerticalAlignment="Top">Say hello, make a feature request, or raise a bug through one of these channels:</TextBlock> |
| 46 | + <Border Grid.Column="1" Grid.Row="2" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Margin="0 8 0 0"> |
| 47 | + <Grid Margin="8"> |
| 48 | + <Button Style="{DynamicResource MaterialDesignFlatButton}" HorizontalAlignment="Left"> |
| 49 | + <StackPanel Orientation="Horizontal"> |
| 50 | + <Viewbox Width="16" Height="16"> |
| 51 | + <Canvas Width="24" Height="24"> |
| 52 | + <Path Data="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" |
| 53 | + Fill="{DynamicResource MaterialDesignBody}" /> |
| 54 | + </Canvas> |
| 55 | + </Viewbox> |
| 56 | + <TextBlock Margin="8 0 0 0" VerticalAlignment="Center">GitHub</TextBlock> |
| 57 | + </StackPanel> |
| 58 | + </Button> |
| 59 | + <Button Style="{DynamicResource MaterialDesignFlatButton}" HorizontalAlignment="Right"> |
| 60 | + <StackPanel Orientation="Horizontal"> |
| 61 | + <Viewbox Width="16" Height="16"> |
| 62 | + <Canvas Width="24" Height="24"> |
| 63 | + <Path Data="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z" |
| 64 | + Fill="{DynamicResource MaterialDesignBody}" /> |
| 65 | + </Canvas> |
| 66 | + </Viewbox> |
| 67 | + <TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Twitter</TextBlock> |
| 68 | + </StackPanel> |
| 69 | + </Button> |
| 70 | + </Grid> |
| 71 | + </Border> |
| 72 | + <Border Grid.Column="1" Grid.Row="3" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}"> |
| 73 | + <Grid Margin="8"> |
| 74 | + <Button Style="{DynamicResource MaterialDesignFlatButton}" HorizontalAlignment="Left"> |
| 75 | + <StackPanel Orientation="Horizontal"> |
| 76 | + <Viewbox Width="16" Height="16"> |
| 77 | + <Canvas Width="24" Height="24"> |
| 78 | + <Path Data="M7.5,2A2,2 0 0,1 9.5,4A2,2 0 0,1 7.5,6A2,2 0 0,1 5.5,4A2,2 0 0,1 7.5,2M6,7H9A2,2 0 0,1 11,9V14.5H9.5V22H5.5V14.5H4V9A2,2 0 0,1 6,7M16.5,2A2,2 0 0,1 18.5,4A2,2 0 0,1 16.5,6A2,2 0 0,1 14.5,4A2,2 0 0,1 16.5,2M15,22V16H12L14.59,8.41C14.84,7.59 15.6,7 16.5,7C17.4,7 18.16,7.59 18.41,8.41L21,16H18V22H15Z" |
| 79 | + Fill="{DynamicResource MaterialDesignBody}" /> |
| 80 | + </Canvas> |
| 81 | + </Viewbox> |
| 82 | + <TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Chat</TextBlock> |
| 83 | + </StackPanel> |
| 84 | + </Button> |
| 85 | + <Button Style="{DynamicResource MaterialDesignFlatButton}" HorizontalAlignment="Right"> |
| 86 | + <StackPanel Orientation="Horizontal"> |
| 87 | + <Viewbox Width="16" Height="16"> |
| 88 | + <Canvas Width="24" Height="24"> |
| 89 | + <Path Data="M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z" |
| 90 | + Fill="{DynamicResource MaterialDesignBody}" /> |
| 91 | + </Canvas> |
| 92 | + </Viewbox> |
| 93 | + <TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Email</TextBlock> |
| 94 | + </StackPanel> |
| 95 | + </Button> |
| 96 | + </Grid> |
| 97 | + </Border> |
| 98 | + </Grid> |
| 99 | + </wpf:Card> |
| 100 | + <wpf:Card Width="420" VerticalAlignment="Top" Margin="8 2 4 16" Height="280"> |
| 101 | + <Grid VerticalAlignment="Stretch"> |
| 102 | + <Grid.RowDefinitions> |
| 103 | + <RowDefinition Height="Auto" /> |
| 104 | + </Grid.RowDefinitions> |
| 105 | + <Grid.ColumnDefinitions> |
| 106 | + <ColumnDefinition Width="200" /> |
| 107 | + <ColumnDefinition Width="*" /> |
| 108 | + </Grid.ColumnDefinitions> |
| 109 | + <Viewbox Width="160" Height="160" HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 110 | + <Canvas Width="24" Height="24"> |
| 111 | + <Path Data="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" Fill="Black" /> |
| 112 | + </Canvas> |
| 113 | + </Viewbox> |
| 114 | + <StackPanel Grid.Column="1"> |
| 115 | + <TextBlock FontSize="28" Margin="16 16 16 8" FontWeight="Light">Open Source</TextBlock> |
| 116 | + <TextBlock TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}" |
| 117 | + VerticalAlignment="Top">This project is completely open source. If you like and want to say thanks you could hit the GitHub Star button, tweet or post about it, or tell your mum about it!</TextBlock> |
| 118 | + </StackPanel> |
| 119 | + </Grid> |
| 120 | + </wpf:Card> |
| 121 | + </StackPanel> |
| 122 | + </ScrollViewer> |
| 123 | + </Grid> |
| 124 | +</UserControl> |
0 commit comments