Skip to content

Commit

Permalink
Merge branch 'develop' into ExpanderFix
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Dec 17, 2016
2 parents f217d96 + 4e91cf4 commit 9f6799e
Show file tree
Hide file tree
Showing 46 changed files with 1,305 additions and 850 deletions.
17 changes: 17 additions & 0 deletions docs/release-notes/1.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
- Binding that is **not supported**
+ `"{Binding Path=CollectionProperty[0]}"`
- This property is available for `TextBox`, `ComboBox`, `NumericUpDown`, `DatePicker`, `TimePicker` and `DateTimePicker`
- `Flyout` changes for better `Margin` usage
+ This changes affects only users who used the sample from the source which shows how to use the `FlyoutsControl` actual width and a `Margin` for the `Flyout`
+ It's now possible to work without the actual width and use only the `Margin` or `HorizontalContentAlignemnt` for Left/Right and `VerticalContentAnlignment` for Top/Bottom `Flyout`.
- `Margin="200 30 0 0"` and `Position="Right"` Flyout with left an top Margin
- `HorizontalContentAlignment="Stretch"` and `Position="Right"` Flyout which covers the whole window
- Changed style names (and changes, see [#2767](https://github.com/MahApps/MahApps.Metro/issues/2767)) for
+ Default `Button` (`ButtonBase`) -> `MahApps.Metro.Styles.MetroButton`
+ Default `ToggleButton` -> `MahApps.Metro.Styles.MetroToggleButton`

## Closed Issues / Pull Requests

Expand All @@ -59,3 +67,12 @@
- [#2694](https://github.com/MahApps/MahApps.Metro/issues/2694) Maximized Window is "Always on Top" when IgnoreTaskbarOnMaximize=True. Window remains "Always on Top" on Restore
- [#2734](https://github.com/MahApps/MahApps.Metro/issues/2734) Mahapps UI is locked in Dialog Window after re-login
- [#2338](https://github.com/MahApps/MahApps.Metro/issues/2338) Impossible to toggle the visibility of TitleBar with UseNoneWindowStyle!
- [#2750](https://github.com/MahApps/MahApps.Metro/pull/2750) Fix for FlipView : Navigation's button visibility and Transition update
- [#2216](https://github.com/MahApps/MahApps.Metro/issues/2216) Flyout with a margin does not slide out properly
- [#2752](https://github.com/MahApps/MahApps.Metro/issues/2752) Unable to change the MessageDialog highlighted button
- [#2687](https://github.com/MahApps/MahApps.Metro/issues/2687) Implement SecureStrng into LoginDialogData and ShowLoginDialog
- [#2756](https://github.com/MahApps/MahApps.Metro/issues/2756) Flyout Position top element focus inhibited by title bar
- [#2755](https://github.com/MahApps/MahApps.Metro/issues/2755) MetroAnimatedTabControl first tab font not changing
- [#2760](https://github.com/MahApps/MahApps.Metro/issues/2760) DatePicker SelectionBackground doesn't match accent color
- [#2766](https://github.com/MahApps/MahApps.Metro/issues/2766) Flyout - Strange issue with a listview
- [#2767](https://github.com/MahApps/MahApps.Metro/issues/2767) Button Border not Transparent when Focused.
Binary file modified src/.paket/paket.bootstrapper.exe
Binary file not shown.
Binary file modified src/.paket/paket.exe
Binary file not shown.
8 changes: 5 additions & 3 deletions src/.paket/paket.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
</PropertyGroup>
<PropertyGroup>
<!-- Paket command -->
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)" $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">"$(PaketBootStrapperExePath)" $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExePath)')">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<!-- Commands -->
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="!Exists('$(PaketReferences)')">$(MSBuildStartupDirectory)\paket.references</PaketReferences>
Expand All @@ -33,7 +34,8 @@
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" />
</Target>
<Target Name="DownloadPaket">
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" />
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true"
Condition=" '$(DownloadPaket)' == 'true' AND '$(DownloadPaketCommand)' != '' AND !Exists('$(PaketExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" ContinueOnError="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:mx="clr-namespace:MetroDemo.Markup"
xmlns:vc="clr-namespace:MetroDemo.ValueConverter"
mc:Ignorable="d"
d:DesignHeight="600"
d:DesignWidth="800"
Expand All @@ -20,7 +22,7 @@
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
</Style>

<DataTemplate x:Key="ImageDataTemplate" x:Shared="False">
<Image Stretch="Fill" Source="{Binding Mode=OneWay, FallbackValue={x:Static DependencyProperty.UnsetValue}}" />
</DataTemplate>
Expand Down Expand Up @@ -110,11 +112,13 @@
<Grid Grid.IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="Group1" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox x:Name="ShowBannerCheckBox"
Grid.Column="0"
Expand All @@ -139,13 +143,19 @@
Margin="5 2"
Content="Show NaviButtons"
IsChecked="True" />
<ComboBox x:Name="Orientation"
ItemsSource="{Binding Source={mx:EnumBindingSource {x:Type Orientation}}, Mode=OneTime}"
SelectedIndex="0"
Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"/>
</Grid>
<Controls:FlipView Height="200"
<Controls:FlipView x:Name="FlipView1st"
Height="200"
Margin="0 0 5 0"
IsBannerEnabled="{Binding ElementName=ShowBannerCheckBox, Path=IsChecked, Mode=OneWay}"
MouseOverGlowEnabled="{Binding ElementName=ShowMouseOverCheckBox, Path=IsChecked, Mode=OneWay}"
CircularNavigation="{Binding ElementName=CircularNaviCheckBox, Path=IsChecked, Mode=OneWay}"
IsNavigationEnabled="{Binding ElementName=ShowNaviCheckBox, Path=IsChecked, Mode=OneWay}"
Orientation="{Binding ElementName=Orientation, Path=SelectedValue, Mode=OneWay}"
SelectionChanged="FlipView_SelectionChanged">
<Controls:FlipView.Items>
<Grid Background="#2E8DEF">
Expand All @@ -171,18 +181,42 @@
</Grid>
</Controls:FlipView.Items>
</Controls:FlipView>
<StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=FlipView1st, Mode=OneWay}" HorizontalAlignment="Center">
<Controls:NumericUpDown Controls:TextBoxHelper.SelectAllOnFocus="True"
ButtonsAlignment="Left"
Interval="1"
Minimum="1"
Maximum="{Binding Path=Items.Count, Mode=OneWay}"
Value="{Binding Path=SelectedIndex, Mode=TwoWay, Converter={vc:Int32IndexToNumberConverter}}"/>
<TextBlock VerticalAlignment="Center" Margin="8 0 0 0">
<Run Text="/" />
<Run Text="{Binding Path=Items.Count, Mode=OneWay}" />
</TextBlock>
</StackPanel>

<Separator Margin="0 5" />

<Controls:FlipView Height="200"
<Controls:FlipView x:Name="FlipView2nd" Height="200"
Margin="0 0 5 0"
BannerText="Databound Items"
IsBannerEnabled="{Binding ElementName=ShowBannerCheckBox, Path=IsChecked, Mode=OneWay}"
MouseOverGlowEnabled="{Binding ElementName=ShowMouseOverCheckBox, Path=IsChecked, Mode=OneWay}"
CircularNavigation="{Binding ElementName=CircularNaviCheckBox, Path=IsChecked, Mode=OneWay}"
IsNavigationEnabled="{Binding ElementName=ShowNaviCheckBox, Path=IsChecked, Mode=OneWay}"
Orientation="{Binding ElementName=Orientation, Path=SelectedValue, Mode=OneWay}"
ItemTemplate="{StaticResource ImageDataTemplate}"
ItemsSource="{Binding FlipViewImages, Mode=OneWay}" />
<StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=FlipView2nd, Mode=OneWay}" HorizontalAlignment="Center">
<Controls:NumericUpDown Controls:TextBoxHelper.SelectAllOnFocus="True"
ButtonsAlignment="Left"
Interval="1"
Minimum="1"
Maximum="{Binding Path=Items.Count, Mode=OneWay}"
Value="{Binding Path=SelectedIndex, Mode=TwoWay, Converter={vc:Int32IndexToNumberConverter}}"/>
<TextBlock VerticalAlignment="Center" Margin="8 0 0 0">
<Run Text="/" />
<Run Text="{Binding Path=Items.Count, Mode=OneWay}" />
</TextBlock>
</StackPanel>
</StackPanel>

<Grid Grid.Row="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ void Tick(object sender, EventArgs e)
private void FlipView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var flipview = ((FlipView)sender);
switch (flipview.SelectedIndex) {
switch (flipview.SelectedIndex)
{
case 0:
flipview.BannerText = "Cupcakes!";
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@

<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
</ResourceDictionary.MergedDictionaries>

<x:Array x:Key="WindowCommandsOverlayBehaviorArray" Type="Controls:WindowCommandsOverlayBehavior">
<Controls:WindowCommandsOverlayBehavior>Always</Controls:WindowCommandsOverlayBehavior>
Expand Down Expand Up @@ -60,7 +57,7 @@
FontSize="{DynamicResource WindowTitleFontSize}"
Text="{TemplateBinding Content}"
TextTrimming="CharacterEllipsis" />
<Button Content="Click Me..." Margin="1" Click="ClickMeOnClick" />
<Button Content="Click Me..." Margin="1" Click="ClickMeOnClick" Style="{StaticResource MetroFlatButton}" />
</StackPanel>
</DataTemplate>
</Controls:MetroWindow.TitleTemplate>
Expand Down Expand Up @@ -88,8 +85,7 @@
<Controls:FlyoutsControl x:Name="flyoutsControl">
<Controls:Flyout x:Name="settingsFlyout"
Controls:ControlsHelper.ContentCharacterCasing="Upper"
Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Controls:FlyoutsControl}, Path=ActualWidth}"
Margin="200 0 0 0"
Margin="200 30 0 0"
AreAnimationsEnabled="False"
FocusedElement="{Binding ElementName=firstTB}"
Header="Settings"
Expand Down Expand Up @@ -131,14 +127,18 @@
</Grid>
</Controls:Flyout>

<Controls:Flyout Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Controls:FlyoutsControl}, Path=ActualWidth, Mode=OneWay}"
AnimateOpacity="True"
<Controls:Flyout AnimateOpacity="True"
CloseButtonIsCancel="True"
Header="New Goodness"
HorizontalContentAlignment="Stretch"
Position="Right">
<StackPanel Margin="10" Orientation="Vertical">
<Button Content="create" />
<Button Content="cancel" />
<Button Content="create"
Margin="2"
Style="{StaticResource MetroFlatButton}" />
<Button Content="cancel"
Margin="2"
Style="{StaticResource MetroFlatButton}" />
</StackPanel>
</Controls:Flyout>

Expand All @@ -153,6 +153,8 @@
<GroupBox Height="250"
Margin="10"
Header="Flyout Group Box" />
<Button Margin="10" Content="Button" />
<ToggleButton Margin="10" Content="Toggle Button" />
</StackPanel>
</Grid>
</Controls:Flyout>
Expand Down Expand Up @@ -194,6 +196,7 @@
Margin="0,5,5,5"
VerticalAlignment="Center" />
<Button x:Name="flyoutSettingsButtonSave"
Style="{StaticResource MetroFlatButton}"
Grid.Row="1"
Grid.Column="1"
Width="75"
Expand Down Expand Up @@ -252,6 +255,22 @@
</Grid>
</Controls:Flyout>

<Controls:Flyout Header="Top"
Position="Top"
Height="150">
<StackPanel Height="80"
Margin="5"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Button Width="36"
Height="36"
Style="{DynamicResource MahApps.Metro.Styles.MetroCircleButtonStyle}">
<iconPacks:PackIconModern Kind="Alert" />
</Button>
</StackPanel>
</Controls:Flyout>

<Controls:Flyout Header="Bottom" Position="Bottom">
<StackPanel Height="80"
Margin="5,5,5,5"
Expand All @@ -266,6 +285,7 @@
</Button>
</StackPanel>
</Controls:Flyout>

<Controls:Flyout Header="Modal"
IsModal="True"
Position="Right">
Expand Down Expand Up @@ -309,6 +329,10 @@
</Controls:MetroWindow.Flyouts>

<Grid>

<Grid.Resources>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource MetroFlatButton}" />
</Grid.Resources>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -458,6 +482,9 @@
<Button Margin="2,10,2,2"
Click="ShowLeft"
Content="Show Left" />
<Button Margin="2"
Click="ShowCustomTop"
Content="Show Custom Top" />
<Button Margin="2"
Click="ShowTop"
Content="Show Top" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,31 @@ private void ShowLeft(object sender, RoutedEventArgs e)
this.ToggleFlyout(7);
}

private void ShowTop(object sender, RoutedEventArgs e)
private void ShowCustomTop(object sender, RoutedEventArgs e)
{
this.ToggleFlyout(8);
}

private void ShowBottom(object sender, RoutedEventArgs e)
private void ShowTop(object sender, RoutedEventArgs e)
{
this.ToggleFlyout(9);
}

private void ShowModal(object sender, RoutedEventArgs e)
private void ShowBottom(object sender, RoutedEventArgs e)
{
this.ToggleFlyout(10);
}

private void ShowAppBar(object sender, RoutedEventArgs e)
private void ShowModal(object sender, RoutedEventArgs e)
{
this.ToggleFlyout(11);
}

private void ShowAppBar(object sender, RoutedEventArgs e)
{
this.ToggleFlyout(12);
}

private void CloseMe(object sender, RoutedEventArgs e)
{
this._hideOnClose = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@
<DependentUpon>VSDemo.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)MainWindowViewModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Markup\EnumBindingSourceExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Navigation\HomePage.xaml.cs">
<DependentUpon>HomePage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Navigation\InterestingPage.xaml.cs">
<DependentUpon>InterestingPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)ValueConverter\AlbumPriceIsTooMuchConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ValueConverter\Int32IndexToNumberConverter.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="$(MSBuildThisFileDirectory)App.xaml">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@
<MenuItem Command="{Binding ShowCustomDialogCommand}" Header="Show CustomDialog via VM" />
</MenuItem>
<MenuItem Header="Window">
<MenuItem Header="ShowTitleBar"
IsCheckable="True"
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}, Path=ShowTitleBar}" />
<MenuItem Header="ShowInTaskbar"
IsCheckable="True"
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}, Path=ShowInTaskbar}" />
Expand Down
Loading

0 comments on commit 9f6799e

Please sign in to comment.