Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 17 14:15
    batzen labeled #1069
  • Nov 17 14:15
    batzen labeled #1080
  • Nov 17 14:15
    batzen labeled #1080
  • Nov 17 14:15
    batzen commented #1080
  • Nov 17 14:13
    batzen commented #1078
  • Nov 17 14:13
    batzen commented #1078
  • Nov 15 13:00
    DaveInCaz opened #1080
  • Nov 12 19:56
    Build #1102 passed
  • Nov 12 18:49
    batzen closed #1079
  • Nov 12 18:49

    batzen on develop

    Fixes #1079 (compare)

  • Nov 12 18:26
    batzen milestoned #1079
  • Nov 12 17:39
    batzen labeled #1079
  • Nov 12 17:39
    batzen assigned #1079
  • Nov 12 17:34
    andyld97 commented #1079
  • Nov 12 16:53
    batzen commented #1079
  • Nov 12 14:42
    andyld97 opened #1079
  • Nov 09 12:07
    batzen commented #1064
  • Nov 09 11:12
    Smallbasic-n closed #1064
  • Nov 09 11:11
    Smallbasic-n commented #1064
  • Nov 09 08:57
    Build #1100 passed
Eugene
@JohnyL
Oh... That simple! Lemme try...
SHould it be in Loaded event? 🤔
Eugene
@JohnyL
Thanks! Everything works!
Bastian Schmidt
@batzen
👍
Fernando
@freviriego
hi, im trying to build and prism regionadapter for Backstage , but i cant figure out how to add or remove Buttons , BackstageTabControls, or BackstageTabItems to the backstage. There is no collection of Items in backstage. . Is it possible? t Should i use another class? hanks in advance
hanks or thanks
Bastian Schmidt
@batzen
I have zero experience with prism.
The structure is Backstage->Content = BackstageTabControl
BackstageTabControl inherits from Selector, so it's a "regular" ItemsControl
Anders Forsgren
@andersforsgren

Does anyone know how to specify more or overriding styles for a ribbon in a non-WPF app?
I can add the additional resource dictionary when I create the Application(), but that doesn't seem to be enough.

if (Application.Current == null)
    new Application();

Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary
{
    Source = new Uri("pack://application:,,,/Fluent;Component/Themes/Generic.xaml", UriKind.RelativeOrAbsolute)
});

var resourcesxaml = (ResourceDictionary)Application.LoadComponent(new Uri("/MyDll;component/Styles/MyStyles.xaml", UriKind.Relative));
Application.Current.Resources.MergedDictionaries.Add(resourcesxaml);

Example of what I'd like to do in the custom MyStyles.xaml

 <Style TargetType="Fluent:DropDownButton">
    <Setter Property="Margin" Value="1 2 3 4"/>
 </Style>

Unless I can load it on an the app level, the only way I seem to be able to make it work is to reference it in every xaml file (e.g. one per ribbon group)
but I might be missing something...

Bastian Schmidt
@batzen
It should just work the way you showed.
At least that's the same approach i am using in unittests.
If you can share a repro application i can have a look at why it doesn't work in your case.
@andersforsgren Mentioning you, just in case you don't get notified.
Anders Forsgren
@andersforsgren
Thanks Bastian, if I know I'm on the right track then I can keep digging. Just needed to know I was digging in the right spot.
Anders Forsgren
@andersforsgren

Fixed it: it was 2 separate issues 1) a build action/item type for the style xaml was incorrect in the csproj 2) When then it worked for most controls but not for a RibbonGroup I realized that was because my ribbon groups were broken out into separate file for each RibbonGroup, but that makes them user controls which are subclasses, which breaks the styling. Not sure if there is a simple way to split a large xaml (10k lines +) into files without usercontrols? I don't need any new behavior for each RibbonGroup, I just want a separate file. It feels like an oversight in WPF that "modularization" (splitting into user controls) breaks styling? I can't make the style's TargetType="Fluent:RibbbonGroupBox" also pick up all 200 sub classes of RibbonGroupBox I believe.

Thanks anyway - I'm sorted now.

Bastian Schmidt
@batzen
When you are inheriting from RibbonGroupBox and override the deafult style key.
WPF has great way to modularize components, but that also comes with a runtime cost. That's the reason why Fluent.Ribbon and also WPF itself only provide one large generic.xaml for consumers. Those files are generated from many small files during compile time.
Bastian Schmidt
@batzen
That's why I provide XAMLTools as an OSS project, so that others don't have to invest in getting combining right. One user reported window load time reductions from ~30 seconds to less than a second just by using a combined xaml file instead of many small ones.
秋水
@tomuGo
..
Qian Zhongxiang
@qianzhongxiang
image.png
Why did I add an icon for Backstage and it doesn't work?
image.png
Bastian Schmidt
@batzen
That's because Backstage inherits from RibbonControl, but it doesn't use Icon.
You have to use Header instead.
Qian Zhongxiang
@qianzhongxiang
Thanks, Bastian, I will try Header instead.
Qian Zhongxiang
@qianzhongxiang
hi, Bastian, I find if I put user control in Header, the click event will be ignored by Backstage. The BackstageAdorner opens when clicking the Backstage border, and nothing happened when clicking the icon in Header. I found the event handler code below.
image.png
This code snippet was cut from "Backstage.cs", and is it bringing the problem above?
Qian Zhongxiang
@qianzhongxiang
And how can I solve it?
Bastian Schmidt
@batzen
You can try to set IsHittestVisible to false on your control.
Qian Zhongxiang
@qianzhongxiang
Thanks, it works for me.
stefmancio
@stefmancio
hi
i'd like to style the menu that appears on right click of main ribbon
image.png
this one.. how can i reach this menu?
Bastian Schmidt
@batzen
It uses the default ContextMenu style, so overwriting that should also change the styling of that menu.
stefmancio
@stefmancio
thanks!
stefmancio
@stefmancio
sorry .. there is a way to style the "white line" that separe different groups?
image.png
the vertical line before the icon save... i'd like to chabge color to dark...
Bastian Schmidt
@batzen
image.png
I have no clue why it's so bright in your screenshot.
The default in the dark theme should look like this:
The resource key for the separator in groups is Fluent.Ribbon.Brushes.GroupSeparator.Background
and is of type Brush
Carla Rivera
@cprivera
Hello! Is there a place where I could look at like, a class definition for the DropDownButton and/or ComboBox? For context I'm working on some accessibility bugs and I just want to understand what my options are for what properties can be set with databinding, what templates are available and just in general the nitty gritty of the controls themselves to see if that might help me figure out why what we have now isn't working.... kinda picking at straws at this point and trying to find any documentation that could be remotely helpful haha
Bastian Schmidt
@batzen
Hi Carla. You can find the source code for the controls at https://github.com/fluentribbon/Fluent.Ribbon/tree/develop/Fluent.Ribbon/Controls and the code for the automation peers at https://github.com/fluentribbon/Fluent.Ribbon/tree/develop/Fluent.Ribbon/Automation/Peers. What exactly doesn't work? It would be nice if you could create one or multiple issues on GitHub for your problems. Maybe we can solve them together. Or if you want to fix them yourself it would be nice if you could contribute those fixes back through a pull request.
stefmancio
@stefmancio
hi Bastian thanks! the default theme was light.. i had to create a custom for the dark mode respecting colors of app dark mode (user can switch)..btw thanks! i solved with ur suggestion!
image.png
can i remove the line above (or make it transparent?)
the white one.. appears while the ribbon is not collapsed..
Bastian Schmidt
@batzen
@stefmancio Fluent.Ribbon comes with a dark theme built in (completely with the ability to sync with windows settings etc.), may i ask why you had to build your own?
The resource key you are looking for should be "Fluent.Ribbon.Brushes.RibbonTabItem.BorderBrush"
Carla Rivera
@cprivera
The issue is that Narrator is not able to read the tool tips set on DropDownButtons, I haven't exactly pinpointed if the problem is with the DropDownButton, the way the tool tip is set, or Narrator itself, although I don't think it's because of the way the tool tip is set because it can be successfully read in NVDA.... I've seen the issue in various instances where our application uses a DropDownButton though, so maybe that narrows it down?
I haven't check if every DropDownButton has this problem but every instance of the problem I've seen does involve a DropDownButton, if that clarifies a bit