Infragistics UltraToolbarsManager - adding ApplicationDefaults to QuickAccessToolbar - winforms

Currently my QuckAccessToobar (QAT) shows only Show Below the Ribbon and Minimize the Ribbon options. I would like to add more options there, like in WordPad sample:
I found non infragistics related explanation here. It says about using QuickAccessToolbar.ApplicationDefaults property.
I found how to add tools to QAT itself (not dropdown) here. But there is no ApplicationDefaults property on ultraToolbarsManager1.Ribbon.QuickAccessToolbar
How can I add items to QAT dropdown so that users can check/uncheck them during runtime to display/hide buttons from QAT?

Turned out that ContextMenuTools property on UltraToolbarsManager.Ribbon.QuickAccessToolbar is exactly what I need.

Related

WPF Toolkit Propertybox does not display nullable Enums

I'm currently using the Extended WPF Toolkit and from that i'm using the Propertybox. This box displays all properties of a bound element. While this works great, there is one problem. I'm using Nullable... so it does not display this enum correctly (it just gives a textbox). If i changed the enum to a normal enum (not nullable), then it displays the items correctly in a combobox.
To solve this, i tried the IItemsSource interface as described in the documentation, but this won't allow me to add a "null" value either.
I know i could solve this by adding a fake "null" value to my enumlist, but i would like to avoid this. Does anyone here know how i could make my nullable display correctly?
Kind regards
Tom
Control documentation:
https://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid
UPDATE SOLUTION:
I "solved" it by using a different control. http://www.codeproject.com/Articles/87715/Native-WPF-4-PropertyGrid. This grid supports it out of the box.
SOLUTION: I "solved" it by using a different control. https://github.com/xceedsoftware/wpftoolkit. This grid supports Nullable out of the box, and has some filtering functions for the properties you want to display that are not included in the Community Edition of the WPF Toolkit.
Update 2020: Added link to current webpage.

Make Custom WinForms Control Work with Narrator (Accessibility)

I have a custom list control derived from Control class.
I need to make it accessible to people with disabilities through MSAA (Microsoft Active Accessibility).
So far I understand that I need to create class that inherits from ControlAccessibleObject and then return its instance in Control.CreateAccessibilityInstance method override.
The problem is that I have implemented this and it seems not work with Windows Narrator tool.
For example, when I click on an item in standard ListView, the Narrator speaks out the selected item text.
But when I click on item in my control, nothing happens (although the item text is requested in my ControlAccessibleObject implementation)
I thought I need to implement IAccessible as well, but I looked on .NET refrence source code and the ListView does not implement this interface. I thought maybe this is implemented in the wrapped Win32 control, so I took a look on similar control - DataGridView - but this does not implement IAccessible as well.
DataGridView have accessibility support, but although I copied all the important code of DataGridViewAccessibleObject, it still does not work in my control.
Do anyone have more experience with custom control accessibility in WinForms?
Okay, I found it: The Control.AccessibilityNotifyClients method does the magic. One have to override this method in a derived control.
However, to make screen readers speak the text, I had to call:
AccessibilityNotifyClients(AccessibleEvents.Focus, index);
AccessibilityNotifyClients(AccessibleEvents.Selection, index);
Here the index is an index of newly selected item.
I found this code in the .NET reference source of CheckedListBox. When I used Focus or Selection event solely, the screen reader have not reacted. The spoken text also depend on the AccessibleObject state that corresponds to a newly selected item.

MultiSelect = FALSE Doesn't Work on LISTVIEW

Language :: Visual C++ Windows Form Application
Platform :: VS 2008 (.Net 4.0)
I am using the Checked ListView control. I have the "MultiSelect" option set to FALSE. This seems to work to only allow one row at a time to be highlighted.
What doesn't seem to be working though is the Check box associated with each item in the ListView. Even with "MultiSelect" = FALSE it is still allowing the user to check more than one item in the list.
I understand the basic premis behind the CheckBox . . . That it allows more than one item to be selected. But, is there any way around this "feature"? Is there any way to limit only one item checked in a Checked ListView even with the "MultiSelect" option = FALSE?
I am desperate.
Thanks! :)
A quick fix could be to un-select all existing items before selecting the new one.

WPF search windows - like tabPages in tab control

I have idea to implement my wpf windows like TabPages in tab control. It is possible to do that dynamically in c# code.
In Example i have Menu in main window. Some Menu items calls search type windows. Is it possible to do such a thing in C# code (SomeMenuItem_Click): this code adds new tab in tabControl of main window.
If there are no search windows called -there is no tab's shown, if there are many search windows called - there are many tab's.
So how do I code this?
And whats the technique with the windows? I suppose that my search type windows must be implemented like some UserControls. I think its no a good idea to implement that like simple wpf windows. I have tried to do that by using Marlon grech "Blend like UIs using DOCKY", find at:
http://marlongrech.wordpress.com/2008/01/29/create-blend-like-uis-using-docky/
But I failed, dont find the way how to add controlls in code dynamically, not in xaml.
I would appreciate code examples to illustrate how to achieve this.
Is it possible to do such a thing in C# code (SomeMenuItem_Click): this code adds new tab in tabControl of main window.
Yes. The basic pattern is:
TabItem newItem = new TabItem();
tabControl.Items.Add(newItem);
You'll obviously need to set the relevant properties of your tab item (such as the Header and Style) but that should get you started.
You'll then need to create any controls you want to show and add them to the tab item itself (or more correctly - a container within the tab item).

WPF Combobox bug when form allowtransparency=true

I have found the following in WPF:
I have a form with AllowTransparency=true. Inside the form I put a Combobox.
I add some items to the combobox.
I run this application and click on the combobox. At first it does not seem to appear at all. On closer inspection (after adding more items) I see that it is actually appearing behind the form. If I add enough items it become visible from behind the form.
If I just change AllowTransparency=false, then all is fine.
This looks like a bug in WPF (3.5 SP1).
Any one know of a workaround for this?
Go to
https://connect.microsoft.com/dashboard/?wa=wsignin1.0
submit your feedback after searching #
https://connect.microsoft.com/VisualStudio
https://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=1160&FeedbackType=1
and mention steps to reproduce.
There was an update of 3.5sp1 but you could test,but I doubt
http://www.microsoft.com/downloads/details.aspx?familyid=6c095bba-6100-4ec9-9c54-6450b0212565&displaylang=en
AllowTransparency is slow and buggy and shouldn't be used - it's a great way to run into bug in various display drivers.
You can get almost anything you like without using AllowTrasparency, take a look at this post for examples:
http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx

Resources