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

BackStage flickering when opening #112

Closed
QuantumDeveloper opened this issue May 14, 2015 · 37 comments
Closed

BackStage flickering when opening #112

QuantumDeveloper opened this issue May 14, 2015 · 37 comments

Comments

@QuantumDeveloper
Copy link

I faced with the issue when Backstage is flickering in left top corner during opening.
OS - Win 7
.Net 4.5
Ribbon lib - 3.4

@batzen
Copy link
Member

batzen commented May 18, 2015

What do you mean with "flickering"?
On my machines it works perfectly fine.
Could you post a video of that issue?

@QuantumDeveloper
Copy link
Author

https://onedrive.live.com/?cid=650F345C1F75A314&id=650f345c1f75a314%21105

Please, pay attention to the top left corner.

@batzen
Copy link
Member

batzen commented May 19, 2015

Indeed, it does flicker a bit.
Anyone willing to invest time fixing this?

@batzen batzen added this to the Next milestone May 19, 2015
@batzen
Copy link
Member

batzen commented May 20, 2015

A had some time to try this on my machines and there is no flickering.
I can see the flickering in your video but not on my machines.
Anyone else seeing this? Maybe it's related to some missing Windows updates or outdated/different video drivers?
In fact the whole left blue part is a single rect...

@batzen batzen removed the Bug 🐞 label May 20, 2015
@batzen batzen removed this from the Next milestone May 20, 2015
@QuantumDeveloper
Copy link
Author

@batzen this could be, but I see it in my work and home PC with different GPU (nvidia, AMD)

@batzen
Copy link
Member

batzen commented May 20, 2015

The problem is that i can't fix such an issue when i can't reproduce it...
It really looks like an WPF issue instead of a Ribbon issue.

@batzen
Copy link
Member

batzen commented Jul 12, 2015

No one willing to invest time fixing this or at least creating a reliable repro?

@batzen batzen added the Waiting for user response 😕 Waiting for the reporter to respond to questions made by maintainer. label Jul 12, 2015
@QuantumDeveloper
Copy link
Author

Do you have any ideas why it could be flickering exactly in that place?

@batzen
Copy link
Member

batzen commented Jul 12, 2015

I guess it's the animation and the titlebar, but I don't know what's really causing this issue... As soon as the backstage is opened the titlebar, or parts of it, react to that change. Maybe it's one of the changes done to the titlebar that causes the flickering. You could try to reproduce the issue when you set "IsQuickAccessToolBarVisible" on the ribbon to "false". If the issue disappears we got a direction to follow. Walking through your video, picture by picture, I can see that the flickering area is opaque when the animation has not started yet and is opaque again when the animation is done.

@QuantumDeveloper
Copy link
Author

Just checked IsQuickAccessToolBarVisible. Its not the toolbar. No matter if I set visibility to true or false. Problem still exists. Do you also have such issue?

@batzen
Copy link
Member

batzen commented Jul 13, 2015

As I said earlier I sadly can't reproduce it thus making fixing it extremely difficult.

@batzen batzen removed the Waiting for user response 😕 Waiting for the reporter to respond to questions made by maintainer. label Jul 13, 2015
@batzen
Copy link
Member

batzen commented Jul 14, 2015

Just commited some changes to the backstage animation, maybe it's better now.
Could you verify if it got better?

@QuantumDeveloper
Copy link
Author

I need to compile latest version from sources?

@batzen
Copy link
Member

batzen commented Jul 14, 2015

Will release version 3.4.2 later which contains the changes.

@QuantumDeveloper
Copy link
Author

ok, as soon as you release it, I will update, check and let you know

@batzen
Copy link
Member

batzen commented Jul 14, 2015

Released.

@QuantumDeveloper
Copy link
Author

Just tested. Issue is still present. It flickers only in part, which is over a Quckaccesstoolbar.

@QuantumDeveloper
Copy link
Author

And if I set it under the ribbon, backstage will still flicker on the same place (on top). So, I think we can exclude the quckaccess itself

@batzen
Copy link
Member

batzen commented Jul 14, 2015

At least we found out that it's not the toolbar...

@batzen
Copy link
Member

batzen commented Jul 14, 2015

Could you try to change the width in the style to check if it's just that small area?
You would have to edit line 206 in Office2013\Controls\BackstageTabControl.xaml just increase width to 500 instead of Auto.

@QuantumDeveloper
Copy link
Author

OK, I will test it

@QuantumDeveloper
Copy link
Author

Seems I underatnd why it is flickering. I have the following code on backstage:

 <fluent:Backstage >
                  <fluent:BackstageTabControl>
                     <fluent:BackstageTabItem Header="Открыть" DataContext="{Binding Path=RibbonViewModel.FileBrowserOpenViewModel}">
                        <fluent:BackstageTabItem.Content>
                              <ribbon:FileBrowserView />
                        </fluent:BackstageTabItem.Content>
                     </fluent:BackstageTabItem>
                     <fluent:BackstageTabItem Header="Импорт" DataContext="{Binding Path=RibbonViewModel.FileBrowserImportViewModel}">
                        <fluent:BackstageTabItem.Content>
                              <ribbon:FileBrowserView />
                        </fluent:BackstageTabItem.Content>
                     </fluent:BackstageTabItem>
                  </fluent:BackstageTabControl>

               </fluent:Backstage>

If I remove items, it opens without flickering, but if at least one item is present, it will flicker. Maybe something is going on while my custom controls is loading?

But i dont know how it can cause this.

@batzen
Copy link
Member

batzen commented Jul 14, 2015

I would guess so. Any chance you can provide them for a repro?

@QuantumDeveloper
Copy link
Author

It will be hard to present you a full repro, but I will try

@QuantumDeveloper
Copy link
Author

Hi, here is my repro project for this issue. Could you please look at it?
https://onedrive.live.com/?id=650F345C1F75A314%21105&cid=650F345C1F75A314&group=0

@batzen
Copy link
Member

batzen commented Jul 16, 2015

That indeed flickers really heavy. Will try to find out what's causing it, but that will take some time as I am away for the weekend.

@QuantumDeveloper
Copy link
Author

I hope you will fix this nasty bug

@batzen
Copy link
Member

batzen commented Jul 21, 2015

It's the datagrid. But I don't know why...

@QuantumDeveloper
Copy link
Author

I know only one reason for flickering UI - its async UI updating.

@wstaelens
Copy link

i have the same issue, glad I'm not the only one! :-)

@wstaelens
Copy link

I have found that when the first BackstageTabItem is selected in the BackstageTabControl then it is flickering, when the second or other BackstageTabItem is selected when showing/hiding the backstage it is not flickering.

@QuantumDeveloper
Copy link
Author

Its not the showcase. I think real problem is that what actually hides under the tabitems. In my case I have the same controls under first and second items and in both case I have flickering

@wstaelens
Copy link

(old thread: #29 )

@floele-ww
Copy link
Contributor

I can see the same issue. I don't really understand the reason why it flickers, but it would work if you made the following changes (Office 2013 theme):

  1. Reduce top offset in BackstageAdorner by TitlebarHeight (25)
  2. Then remove negative margin of the sidebar grid in BackstageTabControl.xaml (as far as I can see the negative margin is the source of the issue)
  3. Increase the top margin of the Grid that hosts the backstage content by TitlebarHeight (25) and set the background color to BackstageBackgroundBrush
  4. Remove background color of "grid" (otherwise the title bar won't be visible)

That retains the look of the backstage area while removing the flicker.

@batzen
Copy link
Member

batzen commented Nov 6, 2015

Will have a look at your suggested changes.
Would be easier if you had created a PR for your changes and include changes for all themes.

@batzen batzen self-assigned this Nov 6, 2015
@batzen batzen added this to the 3.6.1 milestone Nov 19, 2015
@batzen
Copy link
Member

batzen commented Nov 19, 2015

Could you please post the changes you made? It's quite difficult to follow those instructions.
Feel free to just post the whole code and xaml file here.

batzen added a commit that referenced this issue Nov 19, 2015
batzen added a commit that referenced this issue Nov 19, 2015
@batzen
Copy link
Member

batzen commented Nov 19, 2015

Fixed with 909cf12

@batzen batzen closed this as completed Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants