Skip to content

Commit 577f647

Browse files
committed
mashup demo updates...WIP [skip ci]
1 parent e9f7f8b commit 577f647

File tree

4 files changed

+35
-15
lines changed

4 files changed

+35
-15
lines changed

MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
<Prefer32Bit>true</Prefer32Bit>
5151
</PropertyGroup>
5252
<ItemGroup>
53-
<Reference Include="Dragablz, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
54-
<SpecificVersion>False</SpecificVersion>
55-
<HintPath>..\packages\Dragablz.0.0.1.109\lib\net45\Dragablz.dll</HintPath>
53+
<Reference Include="Dragablz, Version=0.0.3.151, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>..\packages\Dragablz.0.0.3.151\lib\net45\Dragablz.dll</HintPath>
55+
<Private>True</Private>
5656
</Reference>
5757
<Reference Include="MahApps.Metro, Version=1.2.0.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
5858
<HintPath>..\packages\MahApps.Metro.1.2.0.0\lib\net45\MahApps.Metro.dll</HintPath>

MahMaterialDragablzMashUp/PaletteSelector.xaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,23 @@
8585
<RowDefinition Height="Auto" />
8686
<RowDefinition Height="*" />
8787
</Grid.RowDefinitions>
88-
<StackPanel Orientation="Horizontal" Margin="8">
89-
<TextBlock VerticalAlignment="Center">Light</TextBlock>
90-
<ToggleButton Margin="8 0 16 0" Command="{Binding ToggleBaseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}" />
91-
<TextBlock VerticalAlignment="Center">Dark</TextBlock>
92-
</StackPanel>
88+
<Grid HorizontalAlignment="Left" Margin="16 0 0 4">
89+
<Grid.RowDefinitions>
90+
<RowDefinition />
91+
<RowDefinition />
92+
</Grid.RowDefinitions>
93+
<Grid.ColumnDefinitions>
94+
<ColumnDefinition />
95+
<ColumnDefinition />
96+
<ColumnDefinition />
97+
</Grid.ColumnDefinitions>
98+
<TextBlock VerticalAlignment="Center">Standard Style</TextBlock>
99+
<ToggleButton Grid.Column="1" Margin="8 4 16 4" Command="{Binding ToggleBaseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}" />
100+
<TextBlock Grid.Column="2" VerticalAlignment="Center">Alternate Style</TextBlock>
101+
<TextBlock Grid.Row="1" VerticalAlignment="Center">Light</TextBlock>
102+
<ToggleButton Grid.Row="1" Grid.Column="1" Margin="8 0 16 0" Command="{Binding ToggleBaseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=IsChecked}" />
103+
<TextBlock Grid.Row="1" Grid.Column="2" VerticalAlignment="Center">Dark</TextBlock>
104+
</Grid>
93105
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
94106
<ItemsControl ItemsSource="{Binding Swatches, Mode=OneTime}">
95107
<ItemsControl.ItemsPanel>

MahMaterialDragablzMashUp/PaletteSelectorViewModel.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,35 @@ public PaletteSelectorViewModel()
1212
Swatches = new SwatchesProvider().Swatches;
1313
}
1414

15+
public ICommand ToggleStyleCommand { get; } = new AnotherCommandImplementation(o => ApplyStyle((bool)o));
16+
1517
public ICommand ToggleBaseCommand { get; } = new AnotherCommandImplementation(o => ApplyBase((bool)o));
1618

19+
public IEnumerable<Swatch> Swatches { get; }
20+
21+
public ICommand ApplyPrimaryCommand { get; } = new AnotherCommandImplementation(o => ApplyPrimary((Swatch)o));
22+
23+
public ICommand ApplyAccentCommand { get; } = new AnotherCommandImplementation(o => ApplyAccent((Swatch)o));
24+
25+
private void ApplyStyle(bool b)
26+
{
27+
throw new System.NotImplementedException();
28+
}
29+
1730
private static void ApplyBase(bool isDark)
1831
{
1932
new PaletteHelper().SetLightDark(isDark);
2033
}
2134

22-
public IEnumerable<Swatch> Swatches { get; }
23-
24-
public ICommand ApplyPrimaryCommand { get; } = new AnotherCommandImplementation(o => ApplyPrimary((Swatch)o));
25-
2635
private static void ApplyPrimary(Swatch swatch)
2736
{
2837
new PaletteHelper().ReplacePrimaryColor(swatch);
2938
}
3039

31-
public ICommand ApplyAccentCommand { get; } = new AnotherCommandImplementation(o => ApplyAccent((Swatch)o));
32-
3340
private static void ApplyAccent(Swatch swatch)
3441
{
3542
new PaletteHelper().ReplaceAccentColor(swatch);
3643
}
44+
3745
}
3846
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Dragablz" version="0.0.1.109" targetFramework="net45" />
3+
<package id="Dragablz" version="0.0.3.151" targetFramework="net45" />
44
<package id="MahApps.Metro" version="1.2.0.0" targetFramework="net45" />
55
</packages>

0 commit comments

Comments
 (0)