amazerol / avaloniaribbon Goto Github PK
View Code? Open in Web Editor NEWRibbon for avalonia
License: MIT License
Ribbon for avalonia
License: MIT License
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 RibbonTabViewModel : ViewModelBase
{
private string _tabHeaderText;
public string TabHeaderText
{
get => _tabHeaderText;
set => SetValue(ref _tabHeaderText, value);
}
public ObservableCollection<RibbonTabViewModel> TabItems { get; } = new ObservableCollection<RibbonTabViewModel>();
}
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!
o you plan to improve functions or add some controls, such as navbarcontrol, docklayoutmanager, ribbonstatus barcontrol, etc
Installing the package through the dotnet CLI with
dotnet add package RibbonControl --version 1.0.0-build230619-12
leads to a package downgrade error
Detected package downgrade: Avalonia from 0.8.1-cibuild0003059-beta to 0.8.0. Reference the package directly from the project to select a different version.
<PackageReference Include="Avalonia" Version="0.10.0-preview5" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.0-preview5" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.0-preview5" />
when the app started , the ribbon bar has the below render effect, but when you change to another ribbon tab, the ribbon render success.
can you provide some help, sincere thanks
Hello,
I was looking for a ribbon control for Avalonia for a long time and came across your project. I have a couple of questions.
Firstly, Is this production ready?
Can I use this with 0.9.x branch of Avalonia which is in kind of preview?
Can't see code base for Ribbon to check the implementation. Is that in a separate repository which ain't listed here?
Can I use it with my application https://github.com/waliarubal/Jaya which I am trying to make like Windows Explorer? I Would like to replace the menu and toolbar of my app with a stable ribbon control.
Hi, I just wanted to say that you have done marvelous work. I have a request regarding the upgradation of this version to Avalonia 11. If you could find time and look into it, I'll be grateful.
regards
I installed the ribbon package with Install-Package AvaloniaUIRibbon -Version 1.0.5-beta
and it seems to not be working.
First, I see this error triangle in the solution explorer:
Second, I included the style with: <StyleInclude Source="avares://Avalonia.Controls.Ribbon/Styles/RibbonStyles.xaml"/>
and get this error:
Third, I included the ribbon with xmlns:ribbon="clr-namespace:AvaloniaUI.Ribbon;assembly=AvaloniaUI.Ribbon"
and my designer doesn't work:
Is there a different package that i should be using?
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.