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

Quick Access Toolbar IsChecked never correctly set #35

Closed
casserlyprogramming opened this issue Dec 4, 2014 · 13 comments
Closed

Quick Access Toolbar IsChecked never correctly set #35

casserlyprogramming opened this issue Dec 4, 2014 · 13 comments
Assignees
Labels
Milestone

Comments

@casserlyprogramming
Copy link

Hi, I have created a really simple Ribbon. The following is the Quick Access Toolbar Section of code:

<r:QuickAccessMenuItem IsChecked="True" Visibility="Visible">
<r:Button Header="Tasks" Icon="Images/tasksicon.png" Visibility="Visible"/>
</r:QuickAccessMenuItem>
<r:QuickAccessMenuItem IsChecked="True" Visibility="Visible">
<r:Button Header="Messages" Icon="Images/messagesicon.png" Visibility="Visible"/>
</r:QuickAccessMenuItem>
</r:Ribbon.QuickAccessItems> 

With that whenever I load the application the Messages and Tasks Items are both hidden and I have to click to select them for them to appear. And yet if I was to select them and then close the application and re-run it the items appear again. However, If I close Blend down and reopen then the items are again not shown.

@batzen
Copy link
Member

batzen commented Dec 11, 2014

Maybe it's caused by AutomaticStateManagement. Try to disable it and see if it works. It might be caused by Blend.

@casserlyprogramming
Copy link
Author

Sorry for the noob question, but how does one disable AutomaticStateManagement?

@batzen
Copy link
Member

batzen commented Dec 12, 2014

That's no noob question ;-).
The ribbon has a property AutomaticStateManagement, just set it to false.

@casserlyprogramming
Copy link
Author

Ok. Thanks. I will have a look at this latter when I get back to my normal PC and I will let you know how I get on. Thanks for your help though batzen.

@casserlyprogramming
Copy link
Author

Worked like a charm. May be a case for having this default to False rather than True. I leave it with you!.

@batzen
Copy link
Member

batzen commented Dec 14, 2014

Why close this?
It seems that we are handling state management while one is using blend, which is wrong.
Did you just use the code you posted above or is there anything else in your project that might cause this behavior? Maybe you could add a repro, tell me which version of blend you are using or if this also happens in the visual studio designer and I will see if I can find and fix the bug.

@batzen batzen reopened this Dec 14, 2014
@casserlyprogramming
Copy link
Author

Sorry, you make a valid point. It seems to work fine in Visual Studio (true/false), however, in Blend for Visual Studio 2012 it doesn't work unless AutomaticStateManagement set to False.

@casserlyprogramming
Copy link
Author

Apart from setting a few buttons in the Ribbon itself there is nothing else in the project yet. I am just using it from scratch and will put in the rest when I get chance at another time so it really is basic at the moment. I can give you the .xaml file if you want. Is there anyway I could attach the xaml file or send it to you so you can see? I personally don't think it will change anything.

@batzen
Copy link
Member

batzen commented Dec 14, 2014

Then I will try to figure out why this happens. I guess we don't detect design time properly when blend is used.

@batzen
Copy link
Member

batzen commented Dec 14, 2014

I guessed correctly. We don't prevent state load and save while in design mode. Will fix this.

@batzen batzen self-assigned this Dec 14, 2014
@batzen batzen added this to the 3.2.0 milestone Dec 14, 2014
@batzen batzen closed this as completed in 583ed59 Dec 14, 2014
@batzen
Copy link
Member

batzen commented Dec 14, 2014

Should be fixed. Could you verify that please?

@casserlyprogramming
Copy link
Author

Just a quick question. Has the RibbonWindow been removed from the assembly as I am getting the error that the tab RibbonWindow does not exist in XML Namespace.

@batzen
Copy link
Member

batzen commented Dec 14, 2014

I did not remove that one. But I noticed that the introduction of CalculatedHeight caused the designer to fail to render properly. Fixed that issue a few seconds ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants