Ribbon button click event not working
See original GitHub issueI am new in wpf. I want to try your Fluent ribbon that’s why downloaded it from Nuget and added it to my project. here is my code:
<Fluent:RibbonWindow x:Class="Fluent.Sample.Foundation.Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
Title="Fluent.Sample.Foundation" Width="800" Height="600" WindowStartupLocation="CenterScreen" >
<Fluent:Ribbon>
<!--Backstage-->
<Fluent:Ribbon.Menu>
<Fluent:Backstage></Fluent:Backstage>
</Fluent:Ribbon.Menu>
<!--Tabs-->
<Fluent:RibbonTabItem Header="Tab">
<Fluent:RibbonGroupBox Header="Group">
<Fluent:Button Name="buttonGreen" Header="Green" Icon="Images\Green.png" LargeIcon="Images\GreenLarge.png"/>
<Fluent:Button Name="buttonGray" Header="Grey" Icon="Images\Gray.png" LargeIcon="Images\GrayLarge.png" Click="btnClick" />
</Fluent:RibbonGroupBox>
</Fluent:RibbonTabItem>
</Fluent:Ribbon>
</Fluent:RibbonWindow>
**MainWindow.xaml.vb**
Class MainWindow
Private Sub btnClick(sender As Object, e As RoutedEventArgs)
MsgBox("test")
End Sub
End Class
But i get this error.
Type 'Fluent.RibbonWindow' is not defined.
Type 'Fluent.Button' is not defined.
'btnClick' is not a member of 'TestRibbon.Fluent.Sample.Foundation.Window'.
when i change Fluent.RibbonWindow to **Global.Fluent.RibbonWindow _and same thing with _Fluent.Button it works well and after some time it again show the same error and i can’t understand why this error occurred ‘btnClick’ is not a member of ‘TestRibbon.Fluent.Sample.Foundation.Window’. I am using vs2013. Can you tell me if I have done anything wrong? Thanks
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Outlook Ribbon on Click Event not working
I have a simple Outlook Ribon button I am trying to create to forward a selected email to a set address. The probelm...
Read more >A button in the command bar is not working correctly
Determine why a button is not working correctly. Several factors can cause a button action to fail. These include invalid ribbon customizations ......
Read more >ValueChanged event not firing when clicking Button on ...
We have followed the issue at the point that we are certain that the ValueChanged event is not fired after the user as...
Read more >how to click on ribbon button using javascript?
I want to trigger click for a ribbon button using Javascript. I used click() hence it did not triggered the event. $("#my.Ribbon.customTab.
Read more >Ribbon button requires 2 clicks before function is invoked
The first time a ribbon button is clicked after an add-in is added to Excel or the page is reloaded, the function should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, VB.NET seems to behave different. You need to use:
That reference was, of course, wrong.