Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Nov 7, 2020
2 parents 0170dba + 0911329 commit 4f92159
Show file tree
Hide file tree
Showing 113 changed files with 4,537 additions and 4,444 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<UserControl x:Class="Caliburn.Metro.Demo.Views.Flyouts.Flyout1View"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="300"
d:DesignWidth="300"
Expand All @@ -18,16 +18,16 @@

<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical">
<TextBox Controls:TextBoxHelper.Watermark="TextBox 01" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 02" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 03" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 04" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 05" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 06" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 07" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 08" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 09" />
<TextBox Margin="0 5 0 0" Controls:TextBoxHelper.Watermark="TextBox 10" />
<TextBox mah:TextBoxHelper.Watermark="TextBox 01" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 02" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 03" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 04" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 05" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 06" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 07" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 08" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 09" />
<TextBox Margin="0 5 0 0" mah:TextBoxHelper.Watermark="TextBox 10" />
</StackPanel>
</ScrollViewer>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<UserControl x:Class="Caliburn.Metro.Demo.Views.Flyouts.FlyoutTopView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="300"
d:DesignWidth="300"
Expand All @@ -17,7 +17,7 @@
Height="36"
FontFamily="Segoe UI Symbol"
FontSize="16"
Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type Controls:Flyout}}, Path=Foreground}"
Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type mah:Flyout}}, Path=Foreground}"
Style="{DynamicResource MahApps.Styles.Button.Circle}">
<iconPacks:PackIconModern Kind="Add" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<Controls:MetroWindow x:Class="Caliburn.Metro.Demo.Views.ShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:cal="http://www.caliburnproject.org"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Flyouts Demo"
Width="800"
Height="600"
BorderBrush="{DynamicResource MahApps.Brushes.Accent}"
BorderThickness="1"
SaveWindowPosition="True"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<mah:MetroWindow x:Class="Caliburn.Metro.Demo.Views.ShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:caliburn="http://www.caliburnproject.org"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Flyouts Demo"
Width="800"
Height="600"
BorderBrush="{DynamicResource MahApps.Brushes.Accent}"
BorderThickness="1"
SaveWindowPosition="True"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">

<Controls:MetroWindow.Resources>
<mah:MetroWindow.Resources>
<Style x:Key="CustomFlyoutStyle"
BasedOn="{StaticResource {x:Type Controls:Flyout}}"
TargetType="{x:Type Controls:Flyout}">
BasedOn="{StaticResource {x:Type mah:Flyout}}"
TargetType="{x:Type mah:Flyout}">
<Setter Property="Header" Value="{Binding Header}" />
<Setter Property="IsOpen" Value="{Binding IsOpen}" />
<Setter Property="Position" Value="{Binding Position}" />
<Setter Property="Theme" Value="{Binding Theme}" />
</Style>
</Controls:MetroWindow.Resources>
</mah:MetroWindow.Resources>

<Controls:MetroWindow.Flyouts>
<Controls:FlyoutsControl x:Name="FlyoutViewModels" ItemContainerStyle="{StaticResource CustomFlyoutStyle}" />
</Controls:MetroWindow.Flyouts>
<mah:MetroWindow.Flyouts>
<mah:FlyoutsControl x:Name="FlyoutViewModels" ItemContainerStyle="{StaticResource CustomFlyoutStyle}" />
</mah:MetroWindow.Flyouts>

<Grid>
<StackPanel Margin="10" HorizontalAlignment="Left">
Expand All @@ -36,19 +36,19 @@
Text="Some Flyout Tests..." />
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(0)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(0)]"
Content="Show 1" />
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(1)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(1)]"
Content="Show 2" />
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(2)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(2)]"
Content="Show 3" />
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(3)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(3)]"
Content="Settings" />
<Button x:Name="Close"
MinWidth="90"
Expand All @@ -61,20 +61,20 @@
VerticalAlignment="Center">
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(5)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(5)]"
Content="Show Top" />
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(6)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(6)]"
Content="Show Bottom" />
</StackPanel>

<StackPanel Margin="10" HorizontalAlignment="Right">
<Button MinWidth="90"
Margin="2"
cal:Message.Attach="[Event Click] = [Action ToggleFlyout(4)]"
caliburn:Message.Attach="[Event Click] = [Action ToggleFlyout(4)]"
Content="Show Left" />
</StackPanel>
</Grid>

</Controls:MetroWindow>
</mah:MetroWindow>
50 changes: 25 additions & 25 deletions src/MahApps.Metro.Samples/MahApps.Metro.Demo/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Application x:Class="MetroDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
StartupUri="MainWindow.xaml">

<Application.Resources>
Expand All @@ -19,7 +19,7 @@
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>

<Style BasedOn="{StaticResource MahApps.Styles.CustomValidationPopup}" TargetType="{x:Type controls:CustomValidationPopup}">
<Style BasedOn="{StaticResource MahApps.Styles.CustomValidationPopup}" TargetType="{x:Type mah:CustomValidationPopup}">
<Setter Property="CloseOnMouseLeftButtonDown" Value="False" />
<Setter Property="ShowValidationErrorOnMouseOver" Value="False" />
</Style>
Expand All @@ -37,36 +37,36 @@
</Storyboard>

<Style BasedOn="{StaticResource MahApps.Styles.Expander}" TargetType="{x:Type Expander}">
<Setter Property="controls:ExpanderHelper.CollapseStoryboard" Value="{StaticResource MahApps.Storyboard.Expander.Collapse.Fast}" />
<Setter Property="mah:ExpanderHelper.CollapseStoryboard" Value="{StaticResource MahApps.Storyboard.Expander.Collapse.Fast}" />
</Style>

<Style x:Key="MahApps.Styles.MetroHeader.Horizontal" TargetType="controls:MetroHeader">
<Style x:Key="MahApps.Styles.MetroHeader.Horizontal" TargetType="mah:MetroHeader">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:MetroHeader">
<ControlTemplate TargetType="mah:MetroHeader">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="HeaderGroup" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Background="{TemplateBinding controls:HeaderedControlHelper.HeaderBackground}">
<controls:ContentControlEx x:Name="PART_Header"
Margin="{TemplateBinding controls:HeaderedControlHelper.HeaderMargin}"
HorizontalAlignment="{TemplateBinding controls:HeaderedControlHelper.HeaderHorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding controls:HeaderedControlHelper.HeaderVerticalContentAlignment}"
Content="{TemplateBinding Header}"
ContentCharacterCasing="{TemplateBinding controls:ControlsHelper.ContentCharacterCasing}"
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
FontFamily="{TemplateBinding controls:HeaderedControlHelper.HeaderFontFamily}"
FontSize="{TemplateBinding controls:HeaderedControlHelper.HeaderFontSize}"
FontStretch="{TemplateBinding controls:HeaderedControlHelper.HeaderFontStretch}"
FontWeight="{TemplateBinding controls:HeaderedControlHelper.HeaderFontWeight}"
Foreground="{TemplateBinding controls:HeaderedControlHelper.HeaderForeground}"
IsTabStop="False"
RecognizesAccessKey="{TemplateBinding controls:ControlsHelper.RecognizesAccessKey}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Grid Grid.Column="0" Background="{TemplateBinding mah:HeaderedControlHelper.HeaderBackground}">
<mah:ContentControlEx x:Name="PART_Header"
Margin="{TemplateBinding mah:HeaderedControlHelper.HeaderMargin}"
HorizontalAlignment="{TemplateBinding mah:HeaderedControlHelper.HeaderHorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding mah:HeaderedControlHelper.HeaderVerticalContentAlignment}"
Content="{TemplateBinding Header}"
ContentCharacterCasing="{TemplateBinding mah:ControlsHelper.ContentCharacterCasing}"
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
FontFamily="{TemplateBinding mah:HeaderedControlHelper.HeaderFontFamily}"
FontSize="{TemplateBinding mah:HeaderedControlHelper.HeaderFontSize}"
FontStretch="{TemplateBinding mah:HeaderedControlHelper.HeaderFontStretch}"
FontWeight="{TemplateBinding mah:HeaderedControlHelper.HeaderFontWeight}"
Foreground="{TemplateBinding mah:HeaderedControlHelper.HeaderForeground}"
IsTabStop="False"
RecognizesAccessKey="{TemplateBinding mah:ControlsHelper.RecognizesAccessKey}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
<Grid Grid.Column="1" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="PART_Content"
Expand All @@ -80,8 +80,8 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="controls:HeaderedControlHelper.HeaderMargin" Value="0 0 4 0" />
<Setter Property="controls:HeaderedControlHelper.HeaderVerticalContentAlignment" Value="Center" />
<Setter Property="mah:HeaderedControlHelper.HeaderMargin" Value="0 0 4 0" />
<Setter Property="mah:HeaderedControlHelper.HeaderVerticalContentAlignment" Value="Center" />
</Style>

</ResourceDictionary>
Expand Down
Loading

0 comments on commit 4f92159

Please sign in to comment.