Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/fluentribbon/develop' into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
floele-ww committed Mar 29, 2016
2 parents 2725e16 + dc96c47 commit 89dc8d9
Show file tree
Hide file tree
Showing 67 changed files with 2,366 additions and 2,694 deletions.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--
### Environment

- Fluent.Ribbon __v?.?.?__
- Theme __?__
- Windows __?__
- .NET Framework __?.?__
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ publish/
# Generated files
Fluent.Ribbon/Themes/**/Generic.xaml
packages/
.tmp

# Allowed files
!Fluent.Ribbon/Themes/Generic.xaml
Expand Down
24 changes: 19 additions & 5 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

## 4.0.0 (preview)

- ### Notices
- **As of now the Office 2010 and Windows 8 themes will be removed in version 5.0. You can vote for this at [Future direction of this library](../../issues/282).**

- ### Breaking changes
- New nuget dependency: [ControlzEx](https://www.nuget.org/packages/ControlzEx)
- BorderlessWindowBehavior was replaced by WindowChromeBehavior from [ControlzEx](https://github.com/ControlzEx/ControlzEx).
This also removes the dependency Microsoft.Windows.Shell as ControlzEx contains everything we need to use WindowChrome.
This behavior is initialized in code behind (InitializeWindowChromeBehavior) and shows which properties of RibbonWindow can be used to control the behavior.
- SaveWindowPosition and WindowSettingBehavior were removed [#196](../../issues/196)
- GlassBorderThickness was renamed to GlassFrameThickness to be consitent with WindowChrome and WindowChromeBehavior [#209](../../issues/209)
- FluentTest project was renamed to Fluent.Showcase [#212](../../issues/212)
- FluentTest project was renamed to Fluent.Ribbon.Showcase [#212](../../issues/212)

- ### Development/Contributing changes
- We switched to Visual Studio 2015 so we can use nameof etc. [#219](../../issues/219)
Expand All @@ -35,20 +38,31 @@
- [#240](../../issues/240) - Backstage closes when popup is dismissed inside backstage
- [#241](../../issues/241) - Keytips should be cancelled if Alt+Num0 is pressed
- [#244](../../issues/244) - KeyTip not working for childs of ContentPresenter
- [#246](../../issues/246) - Bind RibbonGroupBox.DataContext on QuickAccessToolBar
- [#251](../../issues/251) - Changing RibbonStatusBar height to 23 and RibbonStatusBarItem foreground to BackstageFontBrush
- [#246](../../issues/246) - Bind RibbonGroupBox.DataContext on QuickAccessToolBar (thanks to @nishy2000)
- [#251](../../issues/251) - Changing RibbonStatusBar height to 23 and RibbonStatusBarItem foreground to BackstageFontBrush (thanks to @maurosampietro)
- [#254](../../issues/254) - Basic fix for KeyTips not working when focus is inside a WinForms control
- [#256](../../issues/256) - ComboBox items don't update properly on ItemsSource binding source collection changes
- [#255](../../issues/255) - Submenus don't show scroll viewer if items exceed the available space on screen (thanks to @floele-sp)
- [#257](../../issues/257) - Windows8 RibbonWindowTitleTextGlowBackground was missing (thanks to @maurosampietro)
- [#263](../../issues/263) - Changing theme from backstage is broken
- [#267](../../issues/267) - maximizing in Win 10
- [#269](../../issues/269) - Show underscore of header text on RibbonTabItem
- [#272](../../issues/272) - Changing RibbonThemeColorBrush does not change background of ItemsPanel in Backstage
- [#274](../../issues/274) - RadioButton Icon and LargeIcon
- [#280](../../issues/280) - Keytips of the Ribbon overlay StartScreen
- [#284](../../issues/284) - Overriding width of button does not work as it should
- [#285](../../issues/285) - MaterialDesign DialogHost issue with FluentRibbon
- OpenBackstage command was not acting on the correct backstage in a multiple backstage scenario (thanks to @maurosampietro)

- ### Enhancements
- [#120](../../issues/120) - Adding short-cuts or additional information to Application Menu Item (How to improve)
- [#120](../../issues/120) - Adding short-cuts or additional information to Application Menu Item
- [#185](../../issues/185) - Major refactoring of how WindowChrome is used
- [#194](../../issues/194) - There should be an option to disable animations in the whole control
- [#205](../../issues/205) - Fluent Spinner handles Format="P0" incorrectly.
- [#207](../../issues/207) - Enable DragMove on unused RibbonTabControl space like in Office 2013
- [#230](../../issues/230) - Option to disable the "Minimize"-Ribbon Button & Behavior
- [#230](../../issues/230) - Option to disable the "Minimize"-Ribbon Button & Behavior (thanks to @robertmuehsig)
- [#242](../../issues/242) - Add start screen like in office 2013 and upwards
- [#258](../../issues/258) - Refactoring of KeyTipService and KeyTipAdorner (merged with [#264](../../issues/264))

## 3.6.1

Expand Down
20 changes: 20 additions & 0 deletions Dev.NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<clear />
<add key="CI.ControlzEx" value="https://ci.appveyor.com/nuget/controlzex-wfy5aam7u23j" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
<clear />
<add key="CI.ControlzEx" value="https://ci.appveyor.com/nuget/controlzex-wfy5aam7u23j" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</activePackageSource>
</configuration>
75 changes: 61 additions & 14 deletions Fluent.Ribbon.Showcase/TestContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@
</UserControl.LayoutTransform>
<Grid>
<Grid.Resources>
<Style x:Key="GalleryItemStyleWithCustomContextMenu"
TargetType="{x:Type Fluent:GalleryItem}">
<Setter Property="ContextMenu">
<Setter.Value>
<Fluent:ContextMenu>
<Fluent:MenuItem Header="Custom ContextMenu" />
</Fluent:ContextMenu>
</Setter.Value>
</Setter>
</Style>

<DataTemplate x:Key="middleDataItemTemplate"
DataType="{x:Type viewModels:GallerySampleDataItemViewModel}">
<Border>
Expand Down Expand Up @@ -143,6 +154,47 @@
</Fluent:BackstageTabItem.ContentTemplate>
</Fluent:BackstageTabItem>

<Fluent:BackstageTabItem Header="Change theme with fluent controls"
Content="Hello">
<Fluent:BackstageTabItem.ContentTemplate>
<DataTemplate>
<StackPanel>
<Fluent:Button Background="Blue"
Foreground="Black"
Click="OnOffice2010SilverClick">Office 2010 Silver</Fluent:Button>
<Fluent:Button Background="Blue"
Foreground="Black"
Click="OnOffice2010BlackClick">Office 2010 Black</Fluent:Button>
<Fluent:Button Background="Blue"
Foreground="Black"
Click="OnOffice2010BlueClick">Office 2010 Blue</Fluent:Button>
<Fluent:Button Background="Blue"
Foreground="Black"
Click="OnOffice2013Click">Office 2013 White</Fluent:Button>
<Fluent:Button Background="Blue"
Foreground="Black"
Click="OnWindows8Click">Windows8 White</Fluent:Button>
</StackPanel>
</DataTemplate>
</Fluent:BackstageTabItem.ContentTemplate>
</Fluent:BackstageTabItem>

<Fluent:BackstageTabItem Header="Change theme with standard controls"
Content="Hello">
<Fluent:BackstageTabItem.ContentTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:BackstageTabControl}}, Path=ParentBackstage.ActualHeight}" />
<Button Click="OnOffice2010SilverClick">Office 2010 Silver</Button>
<Button Click="OnOffice2010BlackClick">Office 2010 Black</Button>
<Button Click="OnOffice2010BlueClick">Office 2010 Blue</Button>
<Button Click="OnOffice2013Click">Office 2013 White</Button>
<Button Click="OnWindows8Click">Windows8 White</Button>
</StackPanel>
</DataTemplate>
</Fluent:BackstageTabItem.ContentTemplate>
</Fluent:BackstageTabItem>

<Fluent:SeparatorTabItem Header="Separator" />

<Fluent:BackstageTabItem Header="Info"
Expand Down Expand Up @@ -199,6 +251,7 @@
</Fluent:BackstageTabItem>

<Fluent:SeparatorTabItem />

<Fluent:BackstageTabItem Header="New"
KeyTip="N">
<Grid Margin="50"
Expand Down Expand Up @@ -242,12 +295,14 @@
ValueChanged="OnSpinnerValueChanged" />
</Grid>
</Fluent:BackstageTabItem>

<Fluent:BackstageTabItem Header="Print"
KeyTip="P">
<Grid Background="Yellow"
Opacity="0.3"
Margin="50" />
</Fluent:BackstageTabItem>

<Fluent:Button Header="Exit"
Icon="pack://application:,,,/Fluent.Ribbon.Showcase;component/Images/Exit.png"
KeyTip="X"
Expand Down Expand Up @@ -378,8 +433,6 @@
IsChecked="True" />
<Fluent:QuickAccessMenuItem IsChecked="True"
Target="{Binding ElementName=UndoButton}" />
<Fluent:QuickAccessMenuItem IsChecked="True"
Target="{Binding ElementName=RedoButton}" />
</Fluent:Ribbon.QuickAccessItems>

<Fluent:RibbonTabItem x:Name="homeTabItem"
Expand Down Expand Up @@ -978,16 +1031,6 @@
<Fluent:MenuItem Header="Undo something" />
<Fluent:MenuItem Header="Undo another thing" />
</Fluent:SplitButton>

<Fluent:SplitButton x:Name="RedoButton"
KeyTip="Ctrl+Y"
Header="Redo"
Icon="{DynamicResource appbar_redo}"
SizeDefinition="Middle,Small"
Command="ApplicationCommands.Redo"
CanAddButtonToQuickAccessToolBar="True"
FocusManager.IsFocusScope="True">
</Fluent:SplitButton>
</StackPanel>
</Fluent:RibbonGroupBox>
</Fluent:RibbonTabItem>
Expand Down Expand Up @@ -1249,6 +1292,7 @@
Icon="Images\Green.png"
LargeIcon="Images\GreenLarge.png">
<Fluent:Gallery ItemsSource="{Binding DataItems}"
ItemContainerStyle="{DynamicResource GalleryItemStyleWithCustomContextMenu}"
ItemTemplate="{DynamicResource middleDataItemTemplate}"
MaxItemsInRow="3" />
<Fluent:MenuItem Icon="Images\Pink.png"
Expand Down Expand Up @@ -1276,7 +1320,7 @@

<!--InRibbonGallery-->
<Fluent:InRibbonGallery MinItemsInRow="3"
MaxItemsInRow="8"
MaxItemsInRow="5"
Icon="Images\Gray.png"
Header="InRibbonGallery"
ItemWidth="40"
Expand Down Expand Up @@ -2799,7 +2843,10 @@
Text="Test Windows.Forms.TextBox" />
</WindowsFormsHost>

<TextBox>Test System.Windows.Controls.TextBox</TextBox>
<StackPanel>
<Label Target="{Binding ElementName=targetTextBox}">Label with _Access Key A</Label>
<TextBox x:Name="targetTextBox">Test System.Windows.Controls.TextBox</TextBox>
</StackPanel>
</StackPanel>
</GroupBox>
</WrapPanel>
Expand Down
4 changes: 2 additions & 2 deletions Fluent.Ribbon.Showcase/TestContent.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public Button CreateRibbonButton()
{
Command = fooCommand1.ItemCommand,
Header = "Foo",
Icon = new BitmapImage(new Uri(@"Images\Green.png", UriKind.Relative)),
LargeIcon = new BitmapImage(new Uri(@"Images\GreenLarge.png", UriKind.Relative)),
Icon = new BitmapImage(new Uri(@"pack://application:,,,/Fluent.Ribbon.Showcase;component/Images/Green.png", UriKind.Absolute)),
LargeIcon = new BitmapImage(new Uri(@"pack://application:,,,/Fluent.Ribbon.Showcase;component/Images/GreenLarge.png", UriKind.Absolute)),
};

this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
Expand Down
20 changes: 7 additions & 13 deletions Fluent.Ribbon.Showcase/ViewModels/ColorViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
namespace FluentTest.ViewModels
{
using System.Windows;
using System.Windows.Media;

public class ColorViewModel : ViewModel
{
private Color standardColor;
private Color highlightColor;

private readonly Color[] themeColors = { Colors.Red, Colors.Green, Colors.Blue, Colors.White, Colors.Black, Colors.Purple };
private Color themeColor;

public ColorViewModel()
{
this.StandardColor = Colors.Black;
this.HighlightColor = Colors.Yellow;
this.ThemeColor = Colors.Blue;
}

public Color StandardColor
Expand All @@ -23,7 +20,7 @@ public Color StandardColor
set
{
this.standardColor = value;
this.OnPropertyChanged("StandardColor");
this.OnPropertyChanged(nameof(this.StandardColor));
}
}

Expand All @@ -33,22 +30,19 @@ public Color HighlightColor
set
{
this.highlightColor = value;
this.OnPropertyChanged("HighlightColor");
this.OnPropertyChanged(nameof(this.HighlightColor));
}
}

public Color[] ThemeColors
{
get { return this.themeColors; }
}
public Color[] ThemeColors { get; } = { Colors.Red, Colors.Green, Colors.Blue, Colors.White, Colors.Black, Colors.Purple };

public Color ThemeColor
{
get { return this.themeColor; }
get { return ((SolidColorBrush)Application.Current.Resources["RibbonThemeColorBrush"])?.Color ?? Colors.Pink; }
set
{
this.themeColor = value;
this.OnPropertyChanged("ThemeColor");
Application.Current.Resources["RibbonThemeColorBrush"] = new SolidColorBrush(value);
this.OnPropertyChanged(nameof(this.ThemeColor));
}
}
}
Expand Down
35 changes: 32 additions & 3 deletions Fluent.Ribbon.Showcase/ViewModels/GalleryItemViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
namespace FluentTest.ViewModels
{
public class GalleryItemViewModel
public class GalleryItemViewModel : ViewModel
{
private string text;
private string group;

public GalleryItemViewModel(string group, string text)
{
this.Group = group;
this.Text = text;
}

public string Text { get; set; }
public string Text
{
get { return this.text; }

set
{
if (value == this.text)
{
return;
}
this.text = value;
this.OnPropertyChanged(nameof(this.Text));
}
}

public string Group { get; set; }
public string Group
{
get { return this.group; }

set
{
if (value == this.group)
{
return;
}
this.group = value;
this.OnPropertyChanged(nameof(this.Group));
}
}
}
}
5 changes: 1 addition & 4 deletions Fluent.Ribbon.Showcase/ViewModels/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ public class ViewModel : INotifyPropertyChanged
[NotifyPropertyChangedInvocator]
protected void OnPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
4 changes: 2 additions & 2 deletions Fluent.Ribbon.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>ribbon fluent ribbon ribbonwindow office2010 office2013 windows8 backstage</tags>
<dependencies>
<dependency id="ControlzEx" version="2.0.0-dev025" />
<dependency id="ControlzEx" version="2.0.0-dev035" />
</dependencies>
</metadata>
<files>
Expand All @@ -28,4 +28,4 @@
<file src="build\bin\NET 4.5\$Configuration$\Fluent.XML" target="lib\net45" />
<file src="build\bin\NET 4.5\$Configuration$\System.Windows.Interactivity.dll" target="lib\net45" />
</files>
</package>
</package>
Loading

0 comments on commit 89dc8d9

Please sign in to comment.