wpftoolkit

How do I enable text wrapping on all column headers?

随声附和 提交于 2019-11-30 00:08:11
问题 I would like to enable text wrapping on all column headers of my DataGrid, without disabling the other default header functionality, such as column resizing, sort direction indicator, etc. Is there a way to do this? 回答1: Or don't bother with the primitives in the app.xaml file and do the following (my objects): <DataGrid Name="WBdataGrid" AutoGenerateColumns="False" ColumnHeaderHeight="50" > <DataGrid.ColumnHeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property=

Unable to set DataGridColumn's ToolTip

萝らか妹 提交于 2019-11-29 17:37:26
问题 I tried the following: <tk:DataGridTextColumn Header="Item" Binding="{Binding Item.Title}" ToolTipService.ToolTip="{Binding Item.Description}" /> And I don't see any tool tip. Any ideas? Is it even implemented? 回答1: This works for me: <Style TargetType="{x:Type Custom:DataGridColumnHeader}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="ToolTip" Value="{Binding Column.(ToolTipService.ToolTip), RelativeSource={RelativeSource Self}}"/> </Trigger> </Style

wpf datagrid.How to Merge or group cells..?

时光怂恿深爱的人放手 提交于 2019-11-29 15:36:56
I am trying to Merge cells in WPF toolkit datagrid .I am trying to do something as shown in the image below.We can do this in Winforms datagrid.But how to do this using WPF toolkit datagrid ?.Or is there any alternative controls..? Can we do this using listview or listbox..? Or is there any free controls available which have this functionality ? 来源: https://stackoverflow.com/questions/4282539/wpf-datagrid-how-to-merge-or-group-cells

WPF Toolkit Datagrid - how do you turn selection off?

和自甴很熟 提交于 2019-11-29 12:25:12
问题 I have a datagrid in WPF that I am binding to an object. I have a DataGridCheckBoxColumn on there which I want the users to be able to go through and tick the ones they want. Problem is they have to click twice, once for selection then again to check/uncheck. How on earth do you turn this off, I've been searching for way to long to find the answer to this. The datagrid has SelectionMode and SelectionUnit properties - neither of which accept 'none' or 'go away' Any help is appreciated! My code

WpfToolkit DataGrid does not work in Windows Phone 7

旧时模样 提交于 2019-11-29 11:13:54
I am trying to use WpfToolkit DataGrid in Windows Phone 7 project (Silverligt 4) and it's not working. Here is the XAML: <UserControl x:Class="SilverlightControls.Grid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:wtk="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" d:DesignHeight="480" d:DesignWidth="480"> <Grid x:Name="LayoutRoot" Background="

WPF ComboBox/ListBox with MultiSelect based on Enum with Flags

醉酒当歌 提交于 2019-11-29 10:57:33
So I may be pushing the boundaries just a bit... Basically I have the following enum, declared in C# code: [Flags] public enum FlaggedEnum : int { Option1 = 1, Option2 = 2, Option3 = 4, Option4 = 8, ... Option16 = 32768, None = 0 } This enum is a member of an object which I have successfully bound to a DataGrid object. Successfully meaning that I have bound all the other fields successfully. :) What I want to achieve here is a control where all the appropriate options above are checked, that behaves and acts like a ComboBox/ListBox. So you click on the field and a drop-down menu pops up with

WPF Toolkit DataGrid column resize event

梦想与她 提交于 2019-11-29 09:23:32
I am using WPF Toolkit Datagrid in one of the applications I am working on. What I want is to store the column width and displayindex as a user preference. I have achived it for column displayindex but for resize I could not find any event on the datagrid which will trigger after column size change. I have tried the "SizeChanged" event which I guess is only fired when it is initially calculating the size and that too is for the whole datagrid and not for the individual columns. Any alternate solution or if anybody knows about the event ? taken from... : http://forums.silverlight.net/post

wpf Area Chart with Different Colors?

妖精的绣舞 提交于 2019-11-29 08:11:11
I a musing the MS toolkit charts and cannot figure out how to change the color of the areas. I need to populate the chart dynamically which means I do not know ahead of time how many sections the area chart will have. Here is the code I have. var a = new AreaSeries { Title = "a", IndependentValuePath = "Key", DependentValuePath = "Value", Background = Brushes.Plum }; I have tried to change both the Fore Ground and Background and no dice. mcChart.Series.Add(a); a = new AreaSeries { Title = "b", IndependentValuePath = "Key", DependentValuePath = "Value", Background = Brushes.Peru }; mcChart

Datagrid text alignment

倖福魔咒の 提交于 2019-11-29 07:04:30
I was wondering if anyone had an easy way to get the text in a WPF data grid to be center aligned. I got the data grid to work just fine, but the right text alignment bothered me. I goggled some, and downloaded the wpftoolkit, but the examples either do not work, or give me a compile error. I did add the reference to the wpftoolkit to my project. Any help would be appreciated. Thank you the xaml for the data grid is as follows <WpfToolkit:DataGrid AutoGenerateColumns="True" Margin="15,15,10,65" Name="DG1" CanUserReorderColumns="False" /> If you set the Block.TextAlignment property to Center on

WPF toolkit DatePicker change default value 'show calendar'

梦想与她 提交于 2019-11-29 03:56:59
I'm using the latest WPF toolkit , specifically the DatePicker . Everything works fine, but when no value is provided, the default 'SHOW CALENDAR' text appears in the DatePickerTextBox. I want to be able to change this value in WPF. One told me to download the source, add a new Dependency property and recompile to dll. That's cool but what if new version is released? That's why I'd like to template this control in that way, that I'll be able to override this default string. Any idea how to do that? Thanks! OK. I found a solution by myself. <Style TargetType="{x:Type toolkit:DatePickerTextBox}"