0

I meet a problem with Fluent Ribbon. I didn't change anything in XAML, but all Headers of my buttons disapeared. I don't know if it is a bug, or simply a shortcut to change appearance and Hide/Show headers.

Here is how looks the ribbon : header working

And how it looks like from now : header not working

I tried to restart solution but nothing changed, same if I restart VisualStudio. But if I load a backup of solution last week all is working fine, that's why I think there is maybe a shortcut to make them appear/disappear?

Edit :

After additional tests I can add :

  • Issue is present in both Debug and Release mode

  • Problem is on all the solution, in all windows using Ribbon, not only that one

Siegfried.V
  • 1,508
  • 1
  • 16
  • 34
  • I also used fluent ribbon in one of project, Post your respective code so i can check with it. Both codes before and after if not too long but post new codes must – Shubham Sahu Dec 18 '18 at 08:33
  • @ShubhamSahu no difference between before/after, I am still making tests in debug. and one minute before all was working, then next test not working (and only code behind was modified, in another separated window). Just tested something else : problem also occurs in Release, and on all of the windows of solution, not only on that one – Siegfried.V Dec 18 '18 at 08:46
  • Okay so problem only in release, i will suggest you to delete obj and bin folder, nothing more because you are not providing sufficient codes. – Shubham Sahu Dec 18 '18 at 09:21
  • No problem in Debug and Release, already tried to delete obj and bin folders as told me Hideo Kojima earlier, nothing changed. For now only option is take the backup from last week and remake all the modifies. – Siegfried.V Dec 18 '18 at 09:42
  • excuse me, error of punctuation : I meant No, there is an error in both Debug and Release – Siegfried.V Dec 18 '18 at 11:52
  • Okay if you can't show codes here, you can do one more thing, copy relevant codes in to new project then look into designer what happens, if i unable to find difference i do thus trick so i can find is it bug or what mistake i am doing – Shubham Sahu Dec 18 '18 at 14:13
  • @ShubhamSahu it's not that I don't want to put the code, but just for main window, it is 450 lines of code, and I have 3 different windows where the same issue is appearing, and none of the code is changed on 2 of them, on 3rd xaml, just a GridColumn of one ListView changed, that's why I believe it is not a problem due to coding. I guess the only option remaining is take the last backup of solution then modify again all the files. – Siegfried.V Dec 19 '18 at 04:11
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/185458/discussion-between-shubham-sahu-and-siegfried-v). – Shubham Sahu Dec 19 '18 at 04:21

2 Answers2

0

If the code is OK, close the project and clear the cache. After that do not forget to delete the folders "bin" and "debug" and "release". Open the project, do a rebuild. Hope to help.

  • excuse me, but what do you mean by "clear the cache"? – Siegfried.V Dec 18 '18 at 07:52
  • obj folder. Yo can do this with command "Clean", where rebuild. But I always delete manually. – Hideo Kojima Dec 18 '18 at 07:56
  • Do you have label text manually in XAML or bind? or in resources? – Hideo Kojima Dec 18 '18 at 07:59
  • No I have them in a resource file, just tried it, I deleted folders obj and debug, but didn't solve it. But I don't think this is the point, because as U see the groups and all other labels are seen, and they are taken from the same resource file – Siegfried.V Dec 18 '18 at 08:02
  • If everything works for you after Revert, then make a copy of your changes, drop the files that you changed manually (replace the files that you changed, this is important, do not touch the rest). – Hideo Kojima Dec 18 '18 at 08:04
  • I think this should help. – Hideo Kojima Dec 18 '18 at 08:08
  • I know it I already did that several times, but honestly I made lot of changes and it is annoying to do that everytime... I wondered if there was maybe a possibility to Hide/Show them, this would solv everything – Siegfried.V Dec 18 '18 at 08:10
  • finally I did as you said, doing again all modifies one by one and found the issue(see my answer), do you have an idea about it? – Siegfried.V Dec 19 '18 at 16:42
0

I finally decided to restart from a backup, and modify again the code file after file to finally find the issue (apologies to whom I said that I didn't modify xaml, didn't remember about that one, and didn't notice inmediately that this caused a problem).

In my App.xaml file I use the following style :

<Style TargetType="ToolTip">
  <Style.Triggers>
     <Trigger Property="Content"
        Value="{x:Static sys:String.Empty}">
       <Setter Property="Visibility"
          Value="Collapsed" />
     </Trigger>
     <Trigger Property="Content"
        Value="{x:Null}">
       <Setter Property="Visibility"
          Value="Collapsed" />
     </Trigger>
  </Style.Triggers>
</Style>
<Style TargetType="TextBlock">
  <Style.Triggers>
     <Trigger Property="Content"
        Value="{x:Static sys:String.Empty}">
       <Setter Property="Visibility"
          Value="Collapsed" />
     </Trigger>
     <Trigger Property="Content"
        Value="{x:Null}">
       <Setter Property="Visibility"
          Value="Collapsed" />
     </Trigger>
  </Style.Triggers>

I had to remove all the block and all is working again. But then I don't understand why Ribbon headers are influented by the style? Well I guess the headers are in textboxes, but they are not empty?

Siegfried.V
  • 1,508
  • 1
  • 16
  • 34