How to hide devexpress ribbonControl bar items on WinForms - winforms

I want to hide the DevExpress RibbonControl bar items (i know how to hide the page but not the pageGroup and items) based on user's criteria. However, i felt to find the right property to do that. I'm kindly asking for your helping hand.
Thanks

Please use the BarItem.Visibility and RibbonPageGroup.Visible properties:
barButtonItem1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
//...
ribbonPageGroup1.Visible = false;

RibbonControl.Minimized = true
http://www.codeproject.com/Questions/266816/How-to-collapse-expand-ribbon-using-code-in-Devexp

Related

How to open tray popup like 'Sound Control' or 'Action Center'

I'm writing a winform app that lives in the notification tray and the user can open/close it by interacting with the notifyIcon control.
Whene some events happens, I need to notify the user about but the notifyIcon's BalloonTip is not enough, because I need to display a collection of messages paired with buttons, that the user must click in order to acknowledge the app that he really saw it(very serious stuff)
How can I accomplish that? Does winforms provide a specific API? If there's not such API, how do I set up a completely blank form?
Thanks a lot.
Take a look at this question. The notifyIcon1_Click displays a context menu at the mouse position. In your case you need to display a form.
I think the screenshot you put shows a regular form without the title bar. So you just have to make a new form and show it at the mouse position when the user clicks the notification icon.
To remove the title bar from a form just do this form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; or form.ControlBox = false;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.Text = "";
As #dburner said
form.ControlBox = false;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.Text = "";
worked for me. However the first option doesn't give the aero feel.

add tooltip to check box Or radiobutton in runtime silverlight

I am building a control where i put control like checkbox or radiobuttons, i would like know if is possible add a tooltip fore each built control.
Thank you.
See this post. The code is copied from there.
ToolTip nameTip = new ToolTip();
nameTip.Content = "Testing ToolTipService";
ToolTipService.SetToolTip(myCanvas, nameTip);

Google like SearchBox in Silverlight

I've created a Google like SearchBox control in Silverlight. That means, as I type in the box, a DropDownListBox appears just below the SearchBox, showing all the items that match with the text I've typed in searchbox so far (i.e AutoComplete feature), exactly like this:
Now, I want to add a functionality to it : I want to make the DropDownListBox to disappear, as soon as user clicks outside it, or anywhere on the screen. I cannot handle MouseLeftButtonDown (or any such event) in other controls, to accomplish this, because users can click anywhere, including non-silverlight region. Can anybody suggest me what should I do to achieve this?
So my question basically is:
How to know if user has just clicked and the click event occurred outside a particular control?
Please note that AutoCompleteBox doesn't serve my purpose. So I cannot use it.
I have a feeling that working with LostFocus event can solve your problem.
I guess this question is a bit old, but i just stumble upon trying to do the same and finding a solution. This is what i did
Created a Border with All Margins -500, this will cover the full screen essentially.
On Click Behaviour of this Border, the dropdown section of SearchBox
is collapsed.
Adjust z-Index of Border just below the SearchBox and DropDown
section, so clicking on SearchBox or DropDown wouldn't close it.
Set Border Visibility Collapsed, and make it visible when DropDown is Visible.
I hope it helps someone who is looking for the similar problem.

Stop combobox from collapsing when [+] in tree within combobox is clicked - extjs 3

I have implemented tree within combobox using idea from this thread
but when [+] or arrow on tree is clicked, the combobox collapses
Is there any way to stop this????????
Please help me....Thanks alot.......
Regards
Same problem here -- my workaround is to show the tree expanded by default.
Yet that doesn't solve the issue with the arrows...
Basically the combobox sees a "blur" event when clicking on the tree and thus collapses.
But I don't know how to prevent that.
By the way, if someone had a fully working "combobox + tree" solution for ExtJS, that would be very helpful.
Because the solution provided on the Sencha forums is quite limited:
Display and value of the combobox has to be the same (whereas I'd like its value to be the tree's node ID)
There's no way to "restore" the value/display of the combobox when it's part of a form (e.g. using "form.loadRecord()")
Thanks for Pepijn who answered my question. Here is the solution:
you can use the tree beforecollapsenode and beforeexpandnode events to find if they are pressed. See the code below:
tree1.on('click',function(node){
combo.setValue(node.text);
nodeAction=0;
combo.collapse();
});
tree1.on('beforeexpandnode',function(node,deep,anim){
nodeAction=1;
});
tree1.on('beforecollapsenode',function(node,deep,anim){
nodeAction=1;
});
combo.on('collapse',function(){
if(nodeAction==1){
this.expand();
nodeAction=0;
}
});

Silverlight 3 - How to iterate over a datagrid

Thanks in advance,
I am trying to iterate over a datagrid in Silverlight 3.
I need to walk thru all items, or just the selected items and pull some of the column data so I can do an updates in my database.
So in a button click event I have been trying foreach loops but can't find the right combination.
Thanks,
Rich
I think I got it:
foreach (var Item in gridExcludedPOGSList.SelectedItems)
{
ExcludePOGSList pogList = (ExcludePOGSList)Item;
accountNumber = pogList.AccountNumber.ToString();
key_Id = pogList.Key_Id.ToString();
}
Hope it helps someone else.
Rich

Resources