Skip to content

Commit 65d58b7

Browse files
committed
Merge branch 'wongjiahau-New-Demo-2'
2 parents 2f35f2d + f6e6446 commit 65d58b7

40 files changed

+1931
-1818
lines changed

.paket/paket.exe

2.2 MB
Binary file not shown.

MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
-->
169169
<Import Project="..\.paket\paket.targets" />
170170
<Choose>
171-
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
171+
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.2')">
172172
<ItemGroup>
173173
<Reference Include="Dragablz">
174174
<HintPath>..\packages\Dragablz\lib\net45\Dragablz.dll</HintPath>
@@ -179,7 +179,7 @@
179179
</When>
180180
</Choose>
181181
<Choose>
182-
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
182+
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.2')">
183183
<ItemGroup>
184184
<Reference Include="MahApps.Metro">
185185
<HintPath>..\packages\MahApps.Metro\lib\net45\MahApps.Metro.dll</HintPath>

MainDemo.Wpf/Buttons.xaml

Lines changed: 367 additions & 374 deletions
Large diffs are not rendered by default.

MainDemo.Wpf/Cards.xaml

Lines changed: 91 additions & 102 deletions
Large diffs are not rendered by default.

MainDemo.Wpf/Chips.xaml

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,69 +5,62 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:local="clr-namespace:MaterialDesignColors.WpfExample"
77
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
8+
xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
89
mc:Ignorable="d"
910
d:DesignHeight="300" d:DesignWidth="300">
10-
<Grid Margin="32">
11-
<Grid.RowDefinitions>
12-
<RowDefinition Height="Auto" />
13-
<RowDefinition Height="Auto" />
14-
</Grid.RowDefinitions>
15-
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}">Chips</TextBlock>
16-
<StackPanel Grid.Row="1" Margin="0 16 0 0">
17-
<WrapPanel Orientation="Horizontal">
18-
<materialDesign:Chip Content="James Willock" Margin="0 0 6 4">
19-
<materialDesign:Chip.Icon>
20-
<Image Source="Resources/ProfilePic.jpg" />
21-
</materialDesign:Chip.Icon>
22-
</materialDesign:Chip>
23-
<materialDesign:Chip Margin="0 0 4 4">
24-
Example Chip
25-
</materialDesign:Chip>
26-
<materialDesign:Chip Content="ANZ Bank"
11+
<ScrollViewer>
12+
<codeDisplayer:XamlDisplayerPanel HorizontalAlignment="Center" Margin="32">
13+
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Chips</TextBlock>
14+
<materialDesign:Chip Content="James Willock" Margin="0 0 6 4">
15+
<materialDesign:Chip.Icon>
16+
<Image Source="Resources/ProfilePic.jpg" />
17+
</materialDesign:Chip.Icon>
18+
</materialDesign:Chip>
19+
<materialDesign:Chip Margin="0 0 4 4">
20+
Example Chip
21+
</materialDesign:Chip>
22+
<materialDesign:Chip Content="ANZ Bank"
2723
Icon="A"
2824
Margin="0 0 4 4" />
29-
<materialDesign:Chip Content="ZNA Inc"
25+
<materialDesign:Chip Content="ZNA Inc"
3026
Icon="Z"
3127
Margin="0 0 4 4" />
32-
<materialDesign:Chip Content="Twitter"
28+
<materialDesign:Chip Content="Twitter"
3329
IconBackground="{DynamicResource PrimaryHueDarkBrush}"
3430
IconForeground="{DynamicResource PrimaryHueDarkForegroundBrush}"
3531
Margin="0 0 4 4">
36-
<materialDesign:Chip.Icon>
37-
<materialDesign:PackIcon Kind="Twitter"></materialDesign:PackIcon>
38-
</materialDesign:Chip.Icon>
39-
</materialDesign:Chip>
40-
</WrapPanel>
41-
<WrapPanel Margin="0 12 0 0" Orientation="Horizontal">
42-
<materialDesign:Chip Content="James Willock"
32+
<materialDesign:Chip.Icon>
33+
<materialDesign:PackIcon Kind="Twitter"></materialDesign:PackIcon>
34+
</materialDesign:Chip.Icon>
35+
</materialDesign:Chip>
36+
<materialDesign:Chip Content="James Willock"
4337
IsDeletable="True"
4438
Margin="0 0 4 4"
4539
x:Name="ButtonsDemoChip"
4640
Click="ButtonsDemoChip_OnClick"
4741
DeleteClick="ButtonsDemoChip_OnDeleteClick"
48-
ToolTip="Just a tool tip"
42+
ToolTip="Just a tool tip"
4943
DeleteToolTip="Your friendly neighbour delete button"
5044
>
51-
<materialDesign:Chip.Icon>
52-
<Image Source="Resources/ProfilePic.jpg"></Image>
53-
</materialDesign:Chip.Icon>
54-
</materialDesign:Chip>
55-
<materialDesign:Chip Content="Example Chip"
45+
<materialDesign:Chip.Icon>
46+
<Image Source="Resources/ProfilePic.jpg"></Image>
47+
</materialDesign:Chip.Icon>
48+
</materialDesign:Chip>
49+
<materialDesign:Chip Content="Example Chip"
5650
IsDeletable="True"
5751
ToolTip="This is an example chip"
5852
Margin="0 0 4 4">
59-
</materialDesign:Chip>
60-
<materialDesign:Chip Content="ANZ Bank"
53+
</materialDesign:Chip>
54+
<materialDesign:Chip Content="ANZ Bank"
6155
Icon="A"
6256
IsDeletable="True"
6357
Margin="0 0 4 4" />
64-
<materialDesign:Chip Content="ZNA Inc"
58+
<materialDesign:Chip Content="ZNA Inc"
6559
Icon="Z"
6660
IsDeletable="True"
6761
IconBackground="{DynamicResource PrimaryHueLightBrush}"
6862
IconForeground="{DynamicResource PrimaryHueLightForegroundBrush}"
6963
Margin="0 0 4 4" />
70-
</WrapPanel>
71-
</StackPanel>
72-
</Grid>
64+
</codeDisplayer:XamlDisplayerPanel>
65+
</ScrollViewer>
7366
</UserControl>

MainDemo.Wpf/Chips.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Windows.Media.Imaging;
1313
using System.Windows.Navigation;
1414
using System.Windows.Shapes;
15+
using System.Xml;
1516

1617
namespace MaterialDesignColors.WpfExample
1718
{
@@ -23,16 +24,17 @@ public partial class Chips : UserControl
2324
public Chips()
2425
{
2526
InitializeComponent();
27+
2628
}
2729

2830
private void ButtonsDemoChip_OnClick(object sender, RoutedEventArgs e)
2931
{
30-
Console.WriteLine("Chip clicked.");
32+
MainWindow.Snackbar.MessageQueue.Enqueue("Chip clicked!");
3133
}
3234

3335
private void ButtonsDemoChip_OnDeleteClick(object sender, RoutedEventArgs e)
3436
{
35-
Console.WriteLine("Chip delete clicked.");
37+
MainWindow.Snackbar.MessageQueue.Enqueue("Chip delete clicked!");
3638
}
3739

3840
}

MainDemo.Wpf/ColorZones.xaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
7+
xmlns:codeDisplayer="clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
78
mc:Ignorable="d"
89
d:DesignHeight="800" d:DesignWidth="600">
910
<ScrollViewer>
10-
<StackPanel Margin="16">
11-
<TextBlock FontSize="16">Colour Zones</TextBlock>
12-
<TextBlock TextWrapping="Wrap" Margin="0 16 0 0">The ColorZone control allows you to easily define striking blocks of colour to give your application extra clarity and style, whilst still remaining within the bounds of your Material Design palette.</TextBlock>
13-
<TextBlock Margin="0 16 0 0" FontSize="10">Invert the basic paper/body colours.</TextBlock>
11+
<codeDisplayer:XamlDisplayerPanel HorizontalAlignment="Center" >
12+
<StackPanel Margin="16" codeDisplayer:XamlDisplayer.DisplayCode="False">
13+
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}">Colour Zones</TextBlock>
14+
<TextBlock TextWrapping="Wrap" MaxWidth="800" Margin="0 16 0 0" Style="{StaticResource MaterialDesignSubheadingTextBlock}">The ColorZone control allows you to easily define striking blocks of colour to give your application extra clarity and style, whilst still remaining within the bounds of your Material Design palette.</TextBlock>
15+
<TextBlock Margin="0 16 0 0" FontSize="10">Invert the basic paper/body colours.</TextBlock>
16+
</StackPanel>
1417
<materialDesign:ColorZone Mode="Inverted" Padding="16">
1518
<DockPanel>
1619
<materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges">
@@ -26,14 +29,14 @@
2629
</StackPanel>
2730
</DockPanel>
2831
</materialDesign:ColorZone>
29-
<TextBlock Margin="0 16 0 0" FontSize="10">Use primary light back and fore colours.</TextBlock>
32+
<TextBlock Margin="0 16 0 0" TextWrapping="Wrap" Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Use primary light back and fore colours.</TextBlock>
3033
<materialDesign:ColorZone Mode="PrimaryLight" Padding="16">
3134
<StackPanel Orientation="Horizontal">
3235
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
3336
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
3437
</StackPanel>
3538
</materialDesign:ColorZone>
36-
<TextBlock Margin="0 16 0 0" FontSize="10">Use primary mid colours, and nest colour zones!</TextBlock>
39+
<TextBlock Margin="0 16 0 0" Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Use primary mid colours, and nest colour zones!</TextBlock>
3740
<materialDesign:ColorZone Mode="PrimaryMid" Padding="16">
3841
<DockPanel>
3942
<ToggleButton Style="{StaticResource MaterialDesignSwitchAccentToggleButton}" VerticalAlignment="Center"
@@ -67,21 +70,20 @@
6770
</StackPanel>
6871
</DockPanel>
6972
</materialDesign:ColorZone>
70-
<TextBlock Margin="0 16 0 0" FontSize="10">Add in a corner radius and shadow.</TextBlock>
73+
<TextBlock Margin="0 16 0 0" Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Add in a corner radius and shadow.</TextBlock>
7174
<materialDesign:ColorZone Mode="PrimaryDark" Padding="16" CornerRadius="3" materialDesign:ShadowAssist.ShadowDepth="Depth3" Margin="2">
7275
<StackPanel Orientation="Horizontal">
7376
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
7477
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
7578
</StackPanel>
7679
</materialDesign:ColorZone>
77-
<TextBlock Margin="0 16 0 0" FontSize="10">Use accent back and fore colours.</TextBlock>
80+
<TextBlock Margin="0 16 0 0" Style="{StaticResource MaterialDesignSubheadingTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Use accent back and fore colours.</TextBlock>
7881
<materialDesign:ColorZone Mode="Accent" Padding="16">
7982
<StackPanel Orientation="Horizontal">
8083
<ToggleButton Style="{DynamicResource MaterialDesignHamburgerToggleButton}" />
8184
<TextBlock VerticalAlignment="Center" Margin="16 0 0 0">Material Design In XAML Toolkit</TextBlock>
8285
</StackPanel>
8386
</materialDesign:ColorZone>
84-
</StackPanel>
87+
</codeDisplayer:XamlDisplayerPanel>
8588
</ScrollViewer>
86-
8789
</UserControl>

0 commit comments

Comments
 (0)