Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Office like start page #224

Closed
wants to merge 1 commit into from
Closed

Office like start page #224

wants to merge 1 commit into from

Conversation

maurosampietro
Copy link
Contributor

UPDATE:
i don't know why but i'm not able to compile the .net 4.0 project. I use visual studio 2013 and install Microsoft.Net.Compilers for C# 6.0 in order to compile on frameowrk 4.5 but that does not seems to work on framework 4.0.


I created an office like start page that i called 'Frontstage' just to recall the 'Backstage' control.
The frontpage is in fact similar and inherits from the backstage.
Similarly i extended the BackstageTabControl and created the FrontstageTabControl.

The particularity of the frontpage is that is only shown at application start and after closing it, it's not possible to show it again.

I made a few modifications to existing classes:

While doing this, I corrected something i'd call a bug in Backstage.cs that caused multiple backstages not to cooperate correctly if i wanted to implement some sort of navigation (OpenBackstage command was not acting on the correct backstage in a multiple backstage scenario). To fix that i had to expose the backstage from the adorner.

  layer.CommandBindings.Add( new CommandBinding( RibbonCommands.OpenBackstage,
             ( sender, args ) =>
             {
                  //this.IsOpen = !this.IsOpen; //wrong
                  var target = ( (BackstageAdorner)args.Source ).Backstage;
                  target.IsOpen = !target.IsOpen;
             } ) );

The Fronstage needed to intercept Show method, so in backstage.cs Show became protected virtual bool so i can override it in the frontpage and get a value which indicates if it actually opened the backstage or not (since that method is complex).

I still need an help to restyle/retemplate the title bar from the FrontstageTabControl to hide the titlebar's Title maitaining mouse operability (click/move/reposition). Any hint on how to do it is appreciated.

Did this on FLuent dotnet 4.5 only.
Test it out from the FluentTest dotNet 4.5.

I'm not a wpf guru. Let me know if this is a good 'useful' enhancement and if it does reach the miminum standards.

thank you.

P.S. github shows many more editings that i've done probably due to the fact every file i opened was formatted in a strange way... let me know if you can detect/compare the actual modifications

@batzen
Copy link
Member

batzen commented Dec 18, 2015

Hi,

the idea sounds like a nice addition/enhancement.
You need to use Visual Studio 2015 from now on.
There is no need to add Microsoft.Compilers.Net.

I guess you don't have the editorconfig extension installed and you are using tabs instead of spaces that's most probably the cause for the massive formatting changes in your commit.

The spacing seems to be off in your files for other things too as things like

DependencyProperty.Register( "RightContent", typeof( object ), typeof( FrontstageTabControl ) );

should be

DependencyProperty.Register("RightContent", typeof(object), typeof(FrontstageTabControl));

But those are just minor formatting issues I could fix myself as I still have to complete #93 so everyone knows which formatting I prefer.

Please first fix the massive formatting issues, otherwise it's nearly impossible to spot the real changes you made. As soon as you fixed those I will start to add comments to the changes you made.

And thanks for contributing!

@batzen
Copy link
Member

batzen commented Jan 10, 2016

Tracking this in #242 now.

@batzen batzen closed this Jan 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants