Office Ribbon control events in c# - c#

I'm using this third party control
http://officeribbon.codeplex.com/documentation
and i can't find the event when the tab is clicked
example picture:
what i want is to fire an event(execute some code) when file tab is clicked
and fire an event(execute some code) when Tags tab is clicked.
and what event do i need? i tried the events. but it doesnt work
im using c# 2010

i would suggest you can use inbuilt ribbon . these have all the functionality what we need , two type ribbons are available xml and visual designer . visual designer is easy to handle , work same like asp.net or winform control . Hope it will help if not so show your code.

Related

Visual Studio 2013 Add custom toolbar Button

Hey all I have been searching Google for a while now trying to find anything on how to go about setting up you're own button on the VS toolbar.
What I am talking about is this:
And when I click on that button I would like to be able to execute some C# code.
As an example, say I had the word "HELLO" highlighted and I pushed on that button on the toolbar and I wrote some code behind it that, when pressed, have whatever is highlighted turn bold and change color from normal BLACK to .
I was originally thinking that it was called Visual Studio Extensibility Tools but that doesn't seem to be what I am looking for here - it seemed more as a Nuget plugin type of thing?
I'm looking for more like what you can do with the Office suite of products within VS addins - As in make a button for Outlooks toolbar, etc..
The only remotely close thing I could find so far would be this.
If anyone has done this before or at least know what to search for then please let me know!
You were on the right track with Visual Studio Extensiblilty tools.
There are several steps.
Create the Toolbar and add the button.
Create the event handler that runs when the button is clicked.
Determine what document has focus (c# doc, xml doc, vb doc, etc.)
Determine what is selected in the document.
Change the code formatting
Start with an overview of the Extensions SDK.
Here's how to create a toolbar with the VS extensions.
Creating a Toolbar for the IDE

Visual studio wpf events

I'm sure that since visual studio went free you've gotten lots of nooby questions, and I'm here to add onto that pile.
When I make a button in wpf I can't figure out how to get it to let me edit actions for button press. I know how to add events under the triggers tab however when I switch over into the MainWindoww.xaml.cs there isn't any code in it for that event. So what do I need to do in order to work with button events?
P.S I have visual studio 2013 community.
Here is a simple code snippet that will probably help. Assuming that you have a WPF button named btnControl in your XAML, you can add the following click event handle to the code behind (MainWindoww.xaml.cs) module:
btnControl.Click+=(s,e)=>
{
// put your click event proc code here
};
Note: you do not need to modify your XAML.
Hope this will help. Regards,

Visual Studio: Typing code vs. drag and drop from the control menu

I tried creating a gridview by typing code using another block of code on a different page as an example. I found that, when I ran the program and clicked the Edit button on a row, the fields did not change into textboxes for editing. I did have code to handle the Row Editing event.
In an earlier project I found that I had to double-click the Row Editing event in the Properties window for a gridview to create the event handling code. Typing in that code in the separate aspx.cs file did not work.
I am working with ASP.Net / C#.
What is going on with Visual Studio when I do drag and drop from the control menu as opposed to just typing in code? I am assuming it is adding something that I am missing when I am just typing.
Does anyone else have other examples that didn't work when they typed code that I should watch out for?
Even if you did a mighty good job copying the HTML, you likely still missed a few properties. That's because the GridView component comes with a bunch of so-called Design-Time properties that can (only) be configured from the Properties panel in Visual Studio.
I think you'll find that dragging a control from the toolbox onto your web form will set the control's design-time properties to a specific set of default values. This does not happen when you type the HTML by hand.

Using CommandBar to customize ribbon in COM-Addin

I am trying to add a button to the ribbon using CommandBars, but I can't find any example or a way to do that.
I cannot use the CustomUI XML because I need to change the visibility of the button, and it is not supported by the CustomUI XML.
I have found a CommandBar called "Ribbon" with a CommandBarControl that is called "Ribbon" as well, but I don't see how I use it to place a button on "TabHome".
Does anyone know what am I missing here? or can point me out to an example?
Thanks!
As far as I know, you can't use CommandBars to control ribbon. And it makes no sense to do so, as CommandBars technology is depreciated for ribbon ui, and basically supported for compatibility only.
Did not quite get why you don't want to use ribbon xml to customize ribbon? It's the official way. To control button visibility, you should simply set a "getVisible" attribute of the button to your event handler (callback) and and in that callback return true/false to show/hide the button...
What you can't show/hide dynamically are built-in office buttons, but you should be able to show/hide your own buttons without any issues.
Looks quite similar to this one:
Is there a way to use VBA and XML to add a button to the Office 2010 Ribbon depending on a string in the file name?

I can't click on Telerik controls in my WinForms application in Visual Studio

I’m having an issue w/ a WinForms app I built several months ago. I opened it yesterday for the first time in a few months, and I’m unable to click on any of the controls in the form (in Designer view). If I double-click any of the controls on the page, it opens up code for the Load event of the form, as if I double-clicked the form itself; it’s as if the form is on top of all other controls maybe? All of the controls on the form are Telerik controls. I've been working on this project in VS 2010 since its inception. I also tried opening it in VS 2012 this morning, but that didn't help.
If I drag a new Telerik control to the form, it vanishes instantly, as if it’s buried under all of the other controls. If I drag a non-Telerik control to the form (such as a standard textbox), it appears fine, and that control will respond to clicks (ie – the Properties window will populate w/ properties for that control).
After I noticed this issue yesterday, I reluctantly upgraded my Telerik WinForms controls to Q3 this morning, but that hasn’t helped anything.
For now, I was able to bypass the Designer view altogether, and I made changes via the Designer code class. However, I’ll be in trouble if I ever need to actually add a new Telerik control to this form. Any help is appreciated.
This seems like a missing design time assembly. Please have a look at the following articles for explanation and suggestions how to handle this: link link

Categories

Resources