Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e138539
* DatePicker Style: Added FloatingHint Trigger to change margin (now …
JorisCleVR Aug 11, 2017
85d6cf6
Fix DialogHost and DrawerHost background fadeout
cjvaughter Aug 16, 2017
f320bec
Fix Thumb of GridViewColumnHeader.
lyrise Aug 24, 2017
b0e2f3b
When the HorizontalContentAlignment="Center" the cursor was not showi…
Keboo Jan 8, 2018
4c90f90
Update ButtonProgressAssist.cs
koluradev Jan 16, 2018
d2f770a
Fixes #885
Keboo Jan 22, 2018
976eb1d
Remove Header from default context menu in TextBox
ahausmann Feb 12, 2018
57ff327
Added Scale and Offset to the combobox template
glen-nicol Feb 17, 2018
54d8127
mgnslndh Mar 9, 2018
d8dbe56
When parent window cannot be found the paired snackbar is still avail…
Keboo May 5, 2018
341c36c
Fixing name scope issue that would cause ElementName bindings to fail…
Keboo May 8, 2018
426ca45
Updating ShowMeTheXaml to 1.0.10
Keboo May 15, 2018
bdd1eaa
Move opacitymask from grid to adornerdecorater
CookiesAndCoffee May 28, 2018
65f3238
Simple Grammar Corrections
matheuscuba Jul 3, 2018
c3cf7c2
Update MaterialDesignTheme.PasswordBox.xaml
Jul 9, 2018
0c257a7
Update MaterialDesignTheme.PasswordBox.xaml
Jul 9, 2018
fe81a10
Merge pull request #978 from MatheusMCuba/patch-1
Keboo Jul 16, 2018
ad3be8f
Merge pull request #769 from Joris8/master
Keboo Jul 17, 2018
8b7a7ff
Merge pull request #981 from LeafyDev/patch-2
Keboo Jul 19, 2018
a1bad51
Merge pull request #959 from CookiesAndCoffee/FixCardShadowRender
Keboo Jul 19, 2018
58730fd
Merge pull request #910 from mgnslndh/datagridcolumnheader-wrapping
Keboo Jul 19, 2018
5f03da3
Merge pull request #899 from glen-nicol/combobox_hint_scaling
Keboo Jul 19, 2018
185a091
Merge pull request #894 from ahausmann/patch-1
Keboo Jul 23, 2018
73737da
Merge pull request #880 from redstripes89/patch-1
Keboo Jul 23, 2018
a063c40
Merge pull request #780 from Alliance-Network/GridViewColumnHeader_Thumb
Keboo Jul 23, 2018
387e577
Merge pull request #772 from cjvaughter/master
Keboo Jul 23, 2018
8d07657
Merge pull request #952 from Keboo/fix929
Keboo Jul 24, 2018
29fa540
Merge pull request #887 from Keboo/fix885
Keboo Jul 25, 2018
3f1828b
Merge pull request #873 from Keboo/fixCursorMissing
Keboo Jul 25, 2018
bfc61c7
Merge pull request #951 from Keboo/fix950
Keboo Jul 25, 2018
cb2742e
Merge pull request #949 from Keboo/fix946
Keboo Jul 25, 2018
9066428
Update appveyor.yml
Keboo Jul 25, 2018
ad5071d
Remove duplicate margine from cards (#948)
Keboo Jul 25, 2018
351ad72
Added Documentation (#991)
ChinKX Jul 25, 2018
0d26a5d
Update README.md
Keboo Jul 26, 2018
e566730
Adding support for floating scale and floating offset on DatePicker a…
Keboo Jul 26, 2018
bed96d9
Merge branch 'release' into master
Keboo Jul 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Contribution Guidelines

PRs to this project are welcome, but before contributing please bear in mind my thoughts below. If you want to get involved but are unsure, please ask (say hello in the [Gitter chat room](http://gitter.im/ButchersBoy/MaterialDesignInXamlToolkit)). Also note I wrote these guidelines several months after the library was first made available, with the benefit of hindsight. Apologies if there are inconsistencies with what you read below and what's already in the library.
PRs to this project are welcome, but before contributing please bear in mind my thoughts below. If you want to get involved but are unsure, please ask (say hello in the [Gitter chat room](http://gitter.im/ButchersBoy/MaterialDesignInXamlToolkit)). Also note that I wrote these guidelines several months after the library was first made available, with the benefit of hindsight. Apologies if there are inconsistencies with what you read below and what's already in the library.

## The purpose of this libary:
## The purposes of this library:

This is a theme library, **not** a control library. There is a subtle difference. Yes, there are some new custom controls, but their role is to specifically support either styling of existing WPF controls, or to Material Design components, as per the "Components" section in [Google's guidelines](https://www.google.com/design/spec/material-design/introduction.html).

The role of this library is to give users Material Design themes for standard WPF controls, and custom controls for Google specified components where no parallel exists in WPF, or where existing WPF controls cannot be sufficiently styled to meet the Google specification. Anything else is outside the scope of this library. WPF is very powerful and flexible when it comes to creating custom controls, but that doesn't mean I want to fill up this library with random controls. I want to provide the base tools and controls for Material Design, giving people a springboard to create their own controls where required.
The role of this library is to give users Material Design themes for standard WPF controls, and custom controls for Google specified components where no parallel exists in WPF, or where existing WPF controls cannot be sufficiently styled to meet the Google specification. Anything else is outside the scope of this library. WPF is very powerful and flexible when it comes to creating custom controls, but that doesn't mean that I want to fill up this library with random controls. I want to provide the base tools and controls for Material Design, giving people a springboard to create their own controls where required.

In no way is this library a home for any sort of application or business logic.

## Coding standards:

I code using standard Visual Studio settings, using Resharper, and adopt (most of) ReSharper's suggestions. I'd like code to look pretty similar.
I code using standard Visual Studio settings, using Resharper, and adopt (most of the) ReSharper's suggestions. I'd like the code to look pretty similar.

The API is king. If adding anything to the public interface of this library (controls, helpers etc) be mindful of the naming and usage. Don't be offended if I accept your PR but rename things slightly.

## UWP:

This whole project is a personal hobby, and this is even more true of the UWP section. I'm not accepting any PRs to UWP as I will be coding on this in my spare time, and using it as a way to learn and explore UWP for my onw enlightenment. If and when the UWP solution becomes more mature I will relax this stance.
This whole project is a personal hobby, and this is even more true of the UWP section. I'm not accepting any PRs to UWP as I will be coding on this in my spare time, and using it as a way to learn and explore UWP for my own enlightenment. If and when the UWP solution becomes more mature I will relax this stance.

## TabControl:

There is no TabControl style, I won't create one, and I wont accept one. I have Dragablz, and don't want the added burden of supporting two styles; even if it is fully complete. I don't want the duplication and the overhead.
There is no TabControl style, I won't create one, and I wont accept one. I have Dragablz and don't want the added burden of supporting two styles; even if it is fully complete. I don't want the duplication and the overhead.

## Submitting a PR:

Probably the smaller the better (within sensible bounds for the nature of your change); at least keep a single feature to a single branch/PR.
Probably the smaller the better (within sensible bounds for the nature of your change); at least keep a single feature to a single branch/PR.
9 changes: 5 additions & 4 deletions MainDemo.Wpf/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@
</materialDesign:PackIcon>
</materialDesign:PopupBox.ToggleContent>
<Border MaxHeight="600" MaxWidth="800">
<StackPanel>
<avalonEdit:TextEditor Document="{Binding Xaml, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextDocumentValueConverter}}"
Style="{StaticResource AvalonTextEditorXamlDisplay}" />
<DockPanel>
<Button
Margin="0 10 0 0"
Tag="{Binding Xaml, RelativeSource={RelativeSource TemplatedParent}}"
HorizontalAlignment="Right"
Command="Copy"
CommandParameter="{Binding Xaml, RelativeSource={RelativeSource TemplatedParent}}"
Content="_COPY"
DockPanel.Dock="Bottom"
Style="{StaticResource MaterialDesignRaisedButton}">
</Button>
</StackPanel>
<avalonEdit:TextEditor Document="{Binding Xaml, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextDocumentValueConverter}}"
Style="{StaticResource AvalonTextEditorXamlDisplay}" />
</DockPanel>
</Border>

</materialDesign:PopupBox>
Expand Down
14 changes: 11 additions & 3 deletions MainDemo.Wpf/Grids.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:smtx="clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
d:DesignHeight="300" d:DesignWidth="600">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down Expand Up @@ -46,12 +46,20 @@
Header="Description"
MaxLength="255"
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}" />
<materialDesign:MaterialDataGridTextColumn Binding="{Binding Numeric}"
Header="Numeric"
<materialDesign:MaterialDataGridTextColumn Binding="{Binding Numeric}"
Header="Number with long header"
Width="120"
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}">
<DataGridTextColumn.HeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock TextWrapping="Wrap" Text="{Binding}" TextAlignment="Right"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridTextColumn.HeaderStyle>
<DataGridTextColumn.ElementStyle>
Expand Down
15 changes: 15 additions & 0 deletions MainDemo.Wpf/TextFields.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,21 @@
</ComboBox.ItemsPanel>
</ComboBox>
</smtx:XamlDisplay>
<smtx:XamlDisplay Key="fields_27">
<ComboBox materialDesign:HintAssist.Hint="(large float hint)"
materialDesign:HintAssist.FloatingScale="1.5"
materialDesign:HintAssist.FloatingOffset="0, -24"
MinWidth="72"
Margin="16 0 0 0"
ItemsSource="{Binding LongListToTestComboVirtualization}"
Style="{StaticResource MaterialDesignFloatingHintComboBox}">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
</smtx:XamlDisplay>
</StackPanel>
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 16 0 5">Disabled Controls</TextBlock>
<StackPanel Orientation="Horizontal">
Expand Down
4 changes: 4 additions & 0 deletions MainDemo.Wpf/TransitionsDemo/TransitionsDemoHome.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<smtx:XamlDisplay Key="transitions" Grid.Row="1">
<!-- the transitioner will manage your transitions. notice how SelectedIndex is set to zero: the first slide (instead of the default of -1) -->
<materialDesign:Transitioner SelectedIndex="0" AutoApplyTransitionOrigins="True">
<materialDesign:Transitioner.InputBindings>
<KeyBinding Key="Left" Command="{x:Static materialDesign:Transitioner.MovePreviousCommand}" />
<KeyBinding Key="Right" Command="{x:Static materialDesign:Transitioner.MoveNextCommand}" />
</materialDesign:Transitioner.InputBindings>

<!-- you can use a slide for each page, let's add a touch of fade for our first page -->
<materialDesign:TransitionerSlide OpeningEffect="{materialDesign:TransitionEffect FadeIn}">
Expand Down
2 changes: 1 addition & 1 deletion MaterialDesignThemes.Wpf/ButtonProgressAssist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static void SetIsIndicatorVisible(DependencyObject element, bool isIndica

public static bool GetIsIndicatorVisible(DependencyObject element)
{
return (bool)element.GetValue(IndicatorForegroundProperty);
return (bool)element.GetValue(IsIndicatorVisibleProperty);
}
}
}
2 changes: 1 addition & 1 deletion MaterialDesignThemes.Wpf/SnackbarMessageQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ private DispatcherOperation<Snackbar> FindSnackbar(Dispatcher dispatcher)
{
if (!sb.IsLoaded || sb.Visibility != Visibility.Visible) return false;
var window = Window.GetWindow(sb);
return window != null && window.WindowState != WindowState.Minimized;
return window?.WindowState != WindowState.Minimized;
});
});
}
Expand Down
5 changes: 2 additions & 3 deletions MaterialDesignThemes.Wpf/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,11 @@
x:Name="ContentPresenter" Opacity="1"
Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" />
</AdornerDecorator>
<Grid x:Name="PART_ContentCoverGrid" Background="{x:Null}" Opacity="0" IsHitTestVisible="False" Focusable="False" />
<Grid x:Name="PART_ContentCoverGrid" Background="Black" Opacity="0" IsHitTestVisible="False" Focusable="False" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsOpen" Value="True">
<Setter TargetName="ContentPresenter" Property="IsEnabled" Value="False" />
<Setter TargetName="PART_ContentCoverGrid" Property="Background" Value="Black" />
<Setter TargetName="PART_ContentCoverGrid" Property="IsHitTestVisible" Value="True" />
</Trigger>
</ControlTemplate.Triggers>
Expand Down Expand Up @@ -933,7 +932,7 @@
x:Name="ContentPresenter" Opacity="1"
Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentStringFormat="{TemplateBinding ContentStringFormat}" />
</AdornerDecorator>
<Grid x:Name="PART_ContentCover" Background="{x:Null}" Opacity="0" IsHitTestVisible="False" Focusable="False" />
<Grid x:Name="PART_ContentCover" Background="Black" Opacity="0" IsHitTestVisible="False" Focusable="False" />
<Grid>
<Grid HorizontalAlignment="Left" VerticalAlignment="Stretch"
x:Name="PART_LeftDrawer"
Expand Down
20 changes: 10 additions & 10 deletions MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Card.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
<ControlTemplate.Resources>
<converters:ShadowEdgeConverter x:Key="ShadowEdgeConverter" />
</ControlTemplate.Resources>
<Grid Margin="{TemplateBinding Margin}" Background="Transparent">
<Grid.OpacityMask>
<MultiBinding Converter="{StaticResource ShadowEdgeConverter}">
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualWidth"/>
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualHeight"/>
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:ShadowAssist.ShadowDepth)" />
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:ShadowAssist.ShadowEdges)" />
</MultiBinding>
</Grid.OpacityMask>
<Grid Background="Transparent">
<AdornerDecorator CacheMode="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:ShadowAssist.CacheMode)}">
<AdornerDecorator.OpacityMask>
<MultiBinding Converter="{StaticResource ShadowEdgeConverter}">
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualWidth"/>
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualHeight"/>
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:ShadowAssist.ShadowDepth)" />
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:ShadowAssist.ShadowEdges)" />
</MultiBinding>
</AdornerDecorator.OpacityMask>
<Border Effect="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ShadowAssist.ShadowDepth), Converter={x:Static converters:ShadowConverter.Instance}}"
CornerRadius="{TemplateBinding UniformCornerRadius}">
<Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"
Expand All @@ -49,4 +49,4 @@
<Setter Property="Focusable" Value="False"/>
</Style>

</ResourceDictionary>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
UseLayoutRounding="{TemplateBinding UseLayoutRounding}"
UseFloating="{Binding Path=(wpf:HintAssist.IsFloating), RelativeSource={RelativeSource TemplatedParent}}"
FloatingScale="{Binding Path=(wpf:HintAssist.FloatingScale), RelativeSource={RelativeSource TemplatedParent}}"
FloatingOffset="{Binding Path=(wpf:HintAssist.FloatingOffset), RelativeSource={RelativeSource TemplatedParent}}"
HintOpacity="{Binding Path=(wpf:HintAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}"
Hint="{TemplateBinding wpf:HintAssist.Hint}" />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,18 @@
</ControlTemplate.Resources>
<Grid>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Horizontal" Background="Transparent">
<wpf:ListSortDirectionIndicator Width="0" Height="12"
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<wpf:ListSortDirectionIndicator Grid.Column="0" Width="0" Height="12"
x:Name="SortDirectionIndicator"
ListSortDirection="{TemplateBinding SortDirection}"
/>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
<ContentPresenter Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
</StackPanel>
</Grid>
</Border>
<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource MaterialDesignGridColumnHeaderGripper}"/>
<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignGridColumnHeaderGripper}"/>
Expand Down
Loading