Custom checkbox and custom button - c#

I use Visual Studio 2010 and program in C#.
I realized a custom checkbox and a custom button in a panel of a Windows Form.
I wish to click my button and verify all the elements checked into the custom checkbox but I don't know how I can do.
Can you help me please?

Related

ContextMenu on Outlook C# AddIn To-Do-List-Item

I have successfully added a custom button in the contextMenu of a calendar item in the calendar view:
my question is, is it possible to create the same button also in a contextMenu on a To-Do-List-item in Outlook? (because calendar items are listed there too)
(or a workaround for it?)
so when the user right-clicks an To-Do-List-item, a contextmenu should appear with a custom button, and if the user clicks on it, an event should be triggered with the object of the item that was right-clicked on
many thanks!
(Im using a C# Addin in Outlook 2019 with WPF)

Event for toolbars visibility

Installed products
Visual Studio 2017 15.6.1
Description
Visual Studio extension that contains a toolbar with drop down combo still receives advised selection(IVsSelectionEvents) events after toolbar is hidden.
Steps to recreate
Use Drop Down Combo from https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/Combo_Box sample
Use IVsMonitorSelection.AdviseSelectionEvents()
Hide the toolbar.
Current behavior
I could not find any event to be notified when toolbar is hidden/shown so could not stop receiving IVsSelectionEvents interfaces OnSelectionChanged event.
Expected behavior
Notified when toolbar is hidden or shown so Advise/UnadviseSelectionEvents() could be called.
So, i need an event that is triggered when toolbar is shown and hidden.

How to programmatically remove a menu context item in Outlook 2013

I have an Outlook add in that was written with Outlook 2010 in mind but I am updating to handle Outlook 2013 correctly. As part of the add in I have included a number of context menu buttons using the IRibbon method.
At this point these new menu items work correctly, however I wish to remove one of the default Outlook contxt menu buttons with right clicking on a mail item or document in a specific folder.
I have tried declaring a GetVisible event for the button in the Ribbon XML but this does not get fired like the GetVisibile calls I have for my new custom added buttons.
If anyone has any hints, tips or experience with disabling one of the default Outlook 2013 context menu options they would be much appreciated.
Having looked into this further, the "Delete" option I was looking to remove was a new addition on 2013, having originally thought the add in I was working with had removed it in 2010.
It shares the same behaviour as the "Delete" button in the main top ribbon and appears to be a menu item that cannot be removed on an item type basis, but you can suppress the behaviour of the button within the add in.

System.Windows.Controls.RadioButton problems

I'm trying to test whether a radio button is checked, and I keep getting the error that Checked and isChecked are not valid methods for that RadioButton class. I'm using C# and Visual Studio 2010.
Example
if (radioButton4.Checked) maxTotal = 660;
This error seems specific to the System.Windows.Controls.RadioButton class. If I create a System.Windows.Forms.RadioButton from within the code, I don't get the errors. The problem is that the RadioButton that I drag onto the stage (I come from as3) from the WPF Controls Toolbox is of the System.Windows.Controls variety.
I need to figure out how to add the System.Windows.Forms variety of RadioButton to my toolbox, or figure out why the Checked property is not valid with the Controls version. It doesn't make sense. Everywhere I've looked says it should work.
I created the app as a WPF Application. I'm using one of the Forms controls to do something that I think couldn't be done without it. And from what I understand, the Forms components are meant to be used with a Windows Forms Application. So my problem might have something to do with that, but I don't know.
To check if a WPF toggle button is checked use the IsChecked property.
System.Windows.Controls.RadioButton is a descendant class of the ToggleButton.
You should not mix WPF and Windows Forms controls if it is not absolutely neccessary.

Left Menu Tabs Control in Windows Forms Application How can i get it? Its available in current controls?

i am building a C# application, i have explored its all controls but i cant find the left menu style which i usually see in software applications for example visual studio, i am attaching the image of what i need.
Please let me know how can i use it in my forms. I have used a tab menu control in visual studio, but it is not what i required, its tabs are vertical, but i want the exact like i shown in attachment. I think it requires some reference to add.
I don't think that control is available, which means you would have to make one yourself. Here is a link from someone that made one. I haven't tried it: Visual Studios "My Project" Tab Control
There is no such a control in the ToolBox by default. But you could create one for you.
Creat a user controller.
Added a SplitContainer and set Dock.Fill.
Add a FlowLayoutPanel to the Left panel. Add buttons or labels as you wish and implement the click event.

Categories