Add a button to a column header in Telerik RadView - wpf

Is there a way to put a button in the column header of the Telerik RadGridView component for WPF.

Sure: http://www.telerik.com/help/wpf/gridview-styling-column-headers.html
You'll want to create a new custom GridViewHeaderCellTemplate and put your button in there.
GridViewHeaderCellTemplate - the ControlTemplate, applied to the GridViewCell.
Also see: http://www.telerik.com/help/wpf/radgridview-styles-and-templates-templates-structure.html#GridViewHeaderCell

Related

Toggle parent and children Datagrid wpf

I have a scenario where I need to place a wpf datagrid inside the rowDetails template of another datagrid.I have the toggle buttons on each row of parent datagrid to expand and collapse that row details template and I had a toggle button in the header column of parent datagrid to expand all the row details templates in one click.Can someone suggest the way to achieve the toggle functionality as explained using mvvm.
Thanks in advance

Tooltip is not displaying in MDIChild Form

I am using devexpress gridcontrol in my desktop application. But I am facing a problem with tooltip.I used the repositoryHyperlinkbutton and it has 3 buttons in it named view, edit, insert
Now I want to display a tooltip for that three Buttons. I already set the property for it.When I use single form the Tooltip work fine. but when I used that form with MdiParent at that time the Tooltip is not display.
This Problem is solved in above the devexpress 11.5 controls.
I done it.
The cells in a GridView contains no controls - they are only painted. When you click a cell, its in-place editor is created (or - in this case - the 3 image buttons). No controls = no tooltips!

How can I place a 'favorites' icon on a tab using Infragistics XamTabControl?

I want to be able to allow a user to set a module as a Favorite by toggling a star icon that is placed on each tab. Is this possible using Infragistics XamTabs?
The technique you want to use is to template the tab header. You should create a style that targets the TabItemEx and provide a HeaderTemplate.
In my sample I added a Radio Button and an Image to the header which are bound to an IsFavorite property in my viewmodel causing the image to be visible when the radio button is checked. The VisConverter converter is being used to toggle the visibility property of the image.
See more details and my sample here.
http://community.infragistics.com/forums/p/67815/344088.aspx#344088

How to inherit from silverlight Button?

I need to have button have 4 images that are changed by the application action.
I want to define new class ButtonEx that inherit from the Button class.
So, i did it by adding 'silverlight template control' and it to be inherit from control to Button.
Now, i cant see the images whan i put this ButtonEx on the page.
What i did wrong ?
How to fix it ?
( same code work fine in WPF )
Can you post any of your code? Did you create a visual style for it in themes\generic.xaml? Did you set the default style key?
I recently followed this tutuorial for a TextBox, you could so something similar for your button... http://www.silverlightshow.net/items/Create-a-Custom-Control-Inheriting-from-TextBox.aspx
Store your images as resources then create a user control that has
- a button and the content of the button is an image
- a property to select the image from the resources
use the usercontrol as your button.
please post a code sample...
to inherit form button you simply need this.
public class ButtonEx:Button
{
}
this will have all functionality that button has.
if you want new template just add it in Themes/generic.xaml
From your question its not clear that you really need to be subclassing Button. Maybe you can get by with just copying and modifying the template of button (Blend helps for this), or just have the image as content bound to some property for the application to change (using a ValueConverter perhaps).

WPF handle column header click

how to handle a column header click (WPF's DataGrid)
I want to get clicked column header's text from code and change it's background...
ButtonBase.Click can be used

Resources