Styling and behaviour of MenuItems
Posted: 29 Mar 2021, 12:03
Hello everybody,
I'm trying to style menus and menu items.
In App.xaml I defined a style for menu items:
I would now expect that all menu items have a gray background and a magenta foreground. But under Unity everything stays unchanged...
I have the WPF version in parellel to the Unity version and there everything works as expected.
EDIT: When I put the style definitions in the resources section of the corresponding user control, then it seems to work.
So Noesis GUI is obviously not merging the App.xaml part into the other XAML files. What do I have to do to make the definitions in App.xaml available to all other XAML files, as it is under WPF?
The idea of App.xaml is that I have to define global styles and templates only once...
Another issue: Noesis GUI seems to have a kind of focus/mouse over handling for menus. When I move the mouse away from the menu, that whole menu changes colors.
Is this "by design"? WPF doesn't have a specific "focus/mouse over handling" for menus AFAIK.
Last question: where are the Noesis GUI default styles and templates located?
I'm using Version 2.1.0f1.
Thanks in advance!
Günther
btw: would it be too much to ask for a simpe way to attach images to posts? Having to insert an URL means that I have to upload every single image to a host...
I'm trying to style menus and menu items.
In App.xaml I defined a style for menu items:
Code: Select all
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Background" Value="#D3D3D3" />
<Setter Property="Foreground" Value="Magenta" />
</Style>
I have the WPF version in parellel to the Unity version and there everything works as expected.
EDIT: When I put the style definitions in the resources section of the corresponding user control, then it seems to work.
So Noesis GUI is obviously not merging the App.xaml part into the other XAML files. What do I have to do to make the definitions in App.xaml available to all other XAML files, as it is under WPF?
The idea of App.xaml is that I have to define global styles and templates only once...
Another issue: Noesis GUI seems to have a kind of focus/mouse over handling for menus. When I move the mouse away from the menu, that whole menu changes colors.
Is this "by design"? WPF doesn't have a specific "focus/mouse over handling" for menus AFAIK.
Last question: where are the Noesis GUI default styles and templates located?
I'm using Version 2.1.0f1.
Thanks in advance!
Günther
btw: would it be too much to ask for a simpe way to attach images to posts? Having to insert an URL means that I have to upload every single image to a host...