Skip to content

Commit 14c6f03

Browse files
committed
Merge remote-tracking branch 'refs/remotes/ButchersBoy/master'
2 parents 9f33977 + b5723ed commit 14c6f03

File tree

7 files changed

+46
-18
lines changed

7 files changed

+46
-18
lines changed

MainDemo.Wpf/Buttons.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
</ToggleButton>
281281
</StackPanel>
282282

283-
<ListBox Grid.Column="1" Grid.Row="0" Style="{StaticResource MaterialDesignToolToggleListBox}">
283+
<ListBox Grid.Column="1" Grid.Row="0" Style="{StaticResource MaterialDesignToolToggleListBox}" SelectedIndex="0">
284284
<ListBox.ToolTip>
285285
<StackPanel>
286286
<TextBlock Text="MaterialDesignToolToggleListBox" />

MainDemo.Wpf/TextFields.xaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:domain="clr-namespace:MaterialDesignColors.WpfExample.Domain"
77
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
8-
xmlns:materialDesignDemo="clr-namespace:MaterialDesignDemo"
98
xmlns:domain1="clr-namespace:MaterialDesignDemo.Domain"
109
mc:Ignorable="d"
1110
d:DesignHeight="300" d:DesignWidth="600" Loaded="UserControl_Loaded"
@@ -225,5 +224,19 @@
225224
</domain1:SimpleDataTemplateSelector>
226225
</ContentControl.ContentTemplateSelector>
227226
</ContentControl>
227+
<TextBlock Grid.Row="7" Grid.Column="4" Style="{StaticResource MaterialDesignSubheadingTextBlock}"
228+
Margin="0 48 0 0">Tight Space Validation</TextBlock>
229+
<TextBox Grid.Row="8" Grid.Column="4" Width="20"
230+
materialDesign:ValidationAssist.UsePopup="True"
231+
HorizontalAlignment="Left"
232+
ToolTip="Use a popup which can escape the bounds of the control where space is limited">
233+
<TextBox.Text>
234+
<Binding Path="Name" UpdateSourceTrigger="PropertyChanged">
235+
<Binding.ValidationRules>
236+
<domain1:NotEmptyValidationRule ValidatesOnTargetUpdated="True" />
237+
</Binding.ValidationRules>
238+
</Binding>
239+
</TextBox.Text>
240+
</TextBox>
228241
</Grid>
229242
</UserControl>

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ListBox.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<Storyboard>
7777
<DoubleAnimation Storyboard.TargetName="SelectedBackgroundBorder"
7878
Storyboard.TargetProperty="Opacity"
79-
To="0" Duration="1"/>
79+
To="0" Duration="0"/>
8080
</Storyboard>
8181
</VisualTransition>
8282
</VisualStateGroup.Transitions>

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ValidationErrorTemplate.xaml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,42 @@
88
<ControlTemplate.Resources>
99
<DataTemplate DataType="{x:Type ValidationError}">
1010
<TextBlock Foreground="{DynamicResource ValidationErrorBrush}"
11-
FontSize="10"
12-
MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}"
13-
HorizontalAlignment="Left"
14-
Margin="2"
15-
TextWrapping="Wrap"
16-
Text="{Binding ErrorContent}"
17-
UseLayoutRounding="false" />
11+
FontSize="10"
12+
MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}"
13+
HorizontalAlignment="Left"
14+
Margin="2"
15+
TextWrapping="Wrap"
16+
Text="{Binding ErrorContent}"
17+
UseLayoutRounding="false" />
1818
</DataTemplate>
1919
</ControlTemplate.Resources>
2020
<StackPanel>
2121
<AdornedElementPlaceholder Name="Placeholder" />
2222
<Border Name="DefaultErrorViewer"
2323
Visibility="Collapsed"
2424
Background="{DynamicResource MaterialDesignPaper}">
25-
<ContentPresenter Content="{Binding CurrentItem}" />
25+
<TextBlock Foreground="{DynamicResource ValidationErrorBrush}"
26+
FontSize="10"
27+
MaxWidth="{Binding ElementName=Placeholder, Path=ActualWidth}"
28+
HorizontalAlignment="Left"
29+
Margin="0 2"
30+
TextWrapping="Wrap"
31+
Text="{Binding CurrentItem.ErrorContent}"
32+
UseLayoutRounding="false" />
2633
</Border>
27-
2834
<controlzEx:PopupEx x:Name="ValidationPopup"
29-
IsOpen="False"
30-
Placement="Bottom"
31-
PlacementTarget="{Binding ElementName=Placeholder, Mode=OneWay}"
32-
AllowsTransparency="True">
35+
IsOpen="False"
36+
Placement="Bottom"
37+
PlacementTarget="{Binding ElementName=Placeholder, Mode=OneWay}"
38+
AllowsTransparency="True">
3339
<Border Background="{DynamicResource MaterialDesignPaper}">
34-
<ContentPresenter Content="{Binding CurrentItem}" />
40+
<TextBlock Foreground="{DynamicResource ValidationErrorBrush}"
41+
FontSize="10"
42+
HorizontalAlignment="Left"
43+
Margin="0 2"
44+
TextWrapping="Wrap"
45+
Text="{Binding CurrentItem.ErrorContent}"
46+
UseLayoutRounding="false" />
3547
</Border>
3648
</controlzEx:PopupEx>
3749
</StackPanel>

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Comphrehensive and easy to use Material Design theme and control library for the
2222
[![NuGet-Themes](https://img.shields.io/nuget/dt/MaterialDesignColors.svg?label=NuGet-Colors&style=flat-square)](https://www.nuget.org/packages/MaterialDesignColors/)
2323
[![Issues](https://img.shields.io/github/issues/ButchersBoy/MaterialDesignInXamlToolkit.svg?style=flat-square)](https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/issues)
2424
[![Twitter](https://img.shields.io/badge/twitter-%40james__willock-55acee.svg?style=flat-square)](https://twitter.com/James_Willock)
25-
25+
2626
# ![Alt text](web/images/MD4XAML28.png "How Can I Use The Themes?") How Can I Use The Themes?
2727

2828
* Checkout the [Super Quick Start](https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki/Super-Quick-Start)
@@ -35,6 +35,7 @@ To load the source project you will need Visual Studio 2015. Don't worry if you
3535

3636
* Download the source and run the demo.
3737
* Checkout [F1ix](http://materialdesigninxaml.net/f1ix).
38+
* Checkout [Motion List](https://github.com/MaterialDesignInXAML/MotionList).
3839

3940
# ![Alt text](web/images/MD4XAML28.png "Contributions") Contribution Guidelines
4041

@@ -78,6 +79,8 @@ To load the source project you will need Visual Studio 2015. Don't worry if you
7879

7980
![Alt text](web/images/screen-treeview.png "Tree View")
8081

82+
![Alt text](web/images/screen-progress.png "Progress Bars")
83+
8184
![Alt text](web/images/screen-sliders.png "Sliders")
8285

8386
![Alt text](web/images/screen-typography.png "Typography")

web/images/modern-wpf.png

34.5 KB
Loading

web/images/modern-wpf.xcf

85.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)