splitwirez / avaloniaribbon Goto Github PK
View Code? Open in Web Editor NEWThis project forked from amazerol/avaloniaribbon
Ribbon for avalonia
License: MIT License
This project forked from amazerol/avaloniaribbon
Ribbon for avalonia
License: MIT License
When Dock is used with ribbonwindow, Dock cannot receive mouse events correctly.
Perfect work!
It is possible that you upgrade this project to use Avalonia 11.0.0? There is Avalonia 11.0.0-preview4 already. I want to use it with docking on Avalonia 11. I had tried myself but I was not successful due to errors:
Error XAMLIL Unable to find suitable setter or adder for property FontSize of type Avalonia.Controls:Avalonia.Controls.TextBlock for argument netstandard:System.String
Error XAMLIL Unable to find suitable setter or adder for property FontWeight of type Avalonia.Controls:Avalonia.Controls.TextBlock for argument netstandard:System.String
Error XAMLIL Internal compiler error while transforming node XamlX.Ast.XamlAstObjectNode:
XamlX.XamlTypeSystemException: Content (or substitute) attribute is declared on multiple properties of AvaloniaUI.Ribbon:AvaloniaUI.Ribbon.RibbonTab
at XamlX.Transform.TransformerConfiguration.FindContentProperty(IXamlType type)
at XamlX.Transform.Transformers.ResolveContentPropertyTransformer.Transform(AstTransformationContext context, IXamlAstNode node)
at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node) Line 300, position 18. MainWindow.axaml
Thank you!
At present, the original authors do not have the energy to maintain it, or to switch to other directions. I hope that someone will continue to be interested in it (at least come to GitHub), maintain its updates and communication, please leave the repository address, and we will unify it. Is that okay?
We strive to complete it before March 15, 2024.
I forked this repo and updated it to Avalonia 11.0. May I send pull request to update main repo?
Avalonia 0.10?
At times the text of a RibbonButton is cut off when using a long string for the Content property. A workaround is to set the MaxWidth, but this is at often times very annoying as different buttons with different texts require different MaxWidths. Could you implement a feature that will automatically stretch and size the max width depending on the width of the content (a.k.a text)
Did you upload nuget?name?
I hope to integrate with dock, but it is not successful. Can you help me?
https://github.com/wieslawsoltes/Dock.git
i like your work!
do you plan to improve functions or add some controls, such as navbarcontrol, docklayoutmanager, ribbonstatus barcontrol, etc
As far as I can see there is no support to populate the ribbon with MVVM? I mean creating pages, groups & items like buttons using viewmodels would be a great addition. I really like the way DevExpress support in their WPF solution:
View:
<Window>
<Window.DataTemplates>
<DataTemplate DataType="{x:Type RibbonTabViewModel}">
<RibbonTab Header="{Binding TabHeaderText}" GroupsSource="{Binding Groups}" />
</DataTemplate>
<DataTemplate DataType="{x:Type RibbonTabGroupViewModel}>
<RibbonGroupBox Header="{Binding GroupHeaderText}" ItemsSource="{Binding GroupItems}" />
</DataTemplate>
<DataTemplate DataType="{x:Type RibbonCommandViewModel}>
<RibbonButton Header="{Binding Caption}" Command="{Binding}" />
</DataTemplate>
</Window.DataTemplates>
<Ribbon TabItemsSource="{Binding TabItems}" />
</Window>
ViewModels:
public class RibbonViewModel : ViewModelBase
{
public ObservableCollection<RibbonTabViewModel> TabItems { get; } = new ObservableCollection<RibbonTabViewModel>();
}
public class RibbonTabViewModel : ViewModelBase
{
private string _tabHeaderText;
public string TabHeaderText
{
get => _tabHeaderText;
set => SetValue(ref _tabHeaderText, value);
}
public ObservableCollection<RibbonTabGroupViewModel> GroupItems { get; } = new ObservableCollection<RibbonTabGroupViewModel>();
}
public class RibbonTabGroupViewModel : ViewModelBase
{
private string _groupHeaderText;
public string GroupHeaderText
{
get => _groupHeaderText;
set => SetValue(ref _groupHeaderText, value);
}
public ObservableCollection<ViewModelBase> GroupItems { get; } = new ObservableCollection<ViewModelBase>();
}
public class RibbonCommandViewModel : ViewModelBase, ICommand
{
//.....
}
This would make this solution great for a lot of general purpose cases!
use it with dock control, but I can't move it. I don't know if I can solve it;
https://github.com/wieslawsoltes/Dock.git
Using avares:// URIs work
Somethings ../Assets/Image.png works sometimes not (Maybe look into how the Image implements handling these paths with it's Source property)
Hi there,
Is it possible to put an UserControl into DropDown content to a RibbonSplitButton ?
Like this sample :
<RibbonSplitButton
ToolTip.Tip="{Binding TestViewModel}"
Content="{Binding TestViewModel.Label}"
Command="{Binding Path=Command}"
MaxSize="Large"
MinSize="Large">
<input1:CustomUserControl DataContext="{Binding TestViewModel.TestItemViewModel}"/>
</RibbonSplitButton>
I tried with RibbonDropDownButton and I have the same behavior.
Thank in advance
In any application with a ribbon, when it is collapsed you able to click on a tab and the ribbon will open and as soon as you click anywhere else in the application the ribbon closes. And that part works fine with AvaloniaRibbon. However, with said applications, you are also able to click around to other tabs without issues and again once you click off the ribbon it will automatically collapse again. However, with AvaloniaRibbon when you click another tab the ribbon closes and you will have to click that tab again to open it. It's feels very clunky. I'm unable to provide a video cause screen recording is being annoying on my linux machine with two monitors. But i'm sure you can easily recreate it
This project could benefit from a SplitButton when it's added to Avalonia itself. It looks like this functionality is currently disabled: https://github.com/Splitwirez/AvaloniaRibbon/blob/master/AvaloniaUI.Ribbon/RibbonSplitButton.cs
Upgrade Avalonia version?
Foreground works well, but background doesn't work for RibbonGroupBox. Color is unchangeble.
The title bar is showing when using the ribbon inside a usercontrol:
Xaml:
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ribbon="clr-namespace:AvaloniaUI.Ribbon;assembly=AvaloniaUI.Ribbon"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="200"
x:Class="LaserWorks2.Controls.RibbonBar">
<ribbon:Ribbon Name="ribbon">
<ribbon:Ribbon.Tabs>
<ribbon:RibbonTab Header="Home">
<ribbon:RibbonTab.Groups>
<ribbon:RibbonGroupBox Header="Test Group 1" Command="{Binding OnClickCommand}" ribbon:KeyTip.KeyTipKeys="D1">
<ribbon:RibbonButton x:Name="RibbonButton1" Content="Button 1" MinSize="Medium" ToolTip.Tip="Button 1" ribbon:KeyTip.KeyTipKeys="A" CanAddToQuickAccess="True" LargeIcon="{DynamicResource Icon1Large}" Icon="{DynamicResource Icon1}" QuickAccessIcon="{DynamicResource Icon1QuickAccess}"/>
<ribbon:RibbonButton x:Name="RibbonButton2" Content="Button 2" MinSize="Medium" ToolTip.Tip="Button 2" ribbon:KeyTip.KeyTipKeys="B" LargeIcon="{DynamicResource Icon2Large}" Icon="{DynamicResource Icon2}" QuickAccessIcon="{DynamicResource Icon2QuickAccess}"/>
<ribbon:RibbonButton x:Name="RibbonButton3" Content="Button 3" MinSize="Medium" ToolTip.Tip="Button 3" ribbon:KeyTip.KeyTipKeys="C" LargeIcon="{DynamicResource Icon2Large}" Icon="{DynamicResource Icon2}" QuickAccessIcon="{DynamicResource Icon2QuickAccess}"/>
</ribbon:RibbonGroupBox>
</ribbon:RibbonTab.Groups>
</ribbon:RibbonTab>
</ribbon:Ribbon.Tabs>
</ribbon:Ribbon>
</UserControl>
Is it a bug or is there a way to remove it?
Popup menus do not close automatically when lose focus。the https://github.com/Splitwirez/AvaloniaRibbon user 0.9x Avalonia,This problem is not present ,but upgreade to 0.10.x,has this problem too。
1.It is suggested to change the name,Ribbon to ribboncontrol;
2.Modify the namespace, do not mix with Avalonia, take a separate name
I am getting below warning in project Jaya which targets .NET Core 3.1. Please fix targeted framework for the package on nuGet.
warning NU1701: Package 'AvaloniaUIRibbon 1.0.5-beta' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
I believe the sample XAML on the readme page needs updating...
I have a RibbonDropDownButton with a slider attached to it. For example a thickness button, and clicking it will reveal the slider to change the thickness. However, it's not showing correctly.
Here's my XAML and a screenshot
<ribbon:RibbonDropDownButton Content="Thickness" MaxWidth="90" LargeIcon="Size(32, 32); avares://NickvisionPaint/Assets/Thickness.png" ToolTip.Tip="Change the tool's thickness">
<ribbon:RibbonDropDownButton.Items>
<Slider Orientation="Vertical" Minimum="1" Maximum="5"/>
</ribbon:RibbonDropDownButton.Items>
</ribbon:RibbonDropDownButton>
Does the viewlocator seem to be invalid in the example?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.