wpftoolkit

WPF DataGrid - How to move keyboard focus to newly added row after tab press

为君一笑 提交于 2019-12-04 05:33:27
WPF DataGrid add a new row if we press tab on last column of last row. But after adding the new row, the focus is moved to top row of the grid. How can we make sure that the focus is moved to the first column of new row? You could try something like this.SelectRowCell(this.Items.Count - 1, 0); But I'm not sure if that will set the focus too. If not then try the following: DataGridCell cell = this.GetCell(this.Items.Count - 1, 0); if (cell != null) { cell.Focus(); } 来源: https://stackoverflow.com/questions/2645027/wpf-datagrid-how-to-move-keyboard-focus-to-newly-added-row-after-tab-press

Showing busy indicator on a STA thread

蓝咒 提交于 2019-12-04 05:27:31
问题 I have a long operation wehre I'd like to show the Extended Toolkits busy indicator. I made a previous post about this and it was fixed Wpf Extended toolkit BusyIndicator not showing during operation. However, during that call I have to interact with a UI element (canvas) and I get a "The calling thread must be STA, because many UI components require this". I understand (now) that a background worker(see code): private void CboItemId_SelectionChanged(object sender, SelectionChangedEventArgs e

Displaying read only properties in PropertyGrid control

六月ゝ 毕业季﹏ 提交于 2019-12-04 04:11:31
I am using the WPF Extended Toolkit to display the properties of a Team object. Now one of these properties is a collection Persons . No problem I get a nice drop down, which when I click on shows me the names and ages of each of these people. Now the problem is that I don't actually want to expose my Collection as public. However as soon as I make its setter private the property is disabled preventing the user from seeing the Person collection and the person details: How should I display my Person Collection when its setter is private? Can I do this with a XAML template? If so how? I'm using

WPF Toolkit, How to apply date format in C# for datepicker control?

独自空忆成欢 提交于 2019-12-04 03:47:55
问题 WPF Toolkit, How to apply date format in C# for datepicker control? 回答1: I found the one way to solve of my problem by using the culture System.Globalization.CultureInfo culInfo = new System.Globalization.CultureInfo("en-us"); System.Globalization.DateTimeFormatInfo dtinfo = new System.Globalization.DateTimeFormatInfo(); dtinfo.ShortDatePattern = "dd-Mon-yyyy"; dtinfo.DateSeparator = "-"; And apply this short date pattern to date time picker.. It works 回答2: The datepicker in WPF Toolkit allow

Order that DependencyProperties bindings are evaluated?

让人想犯罪 __ 提交于 2019-12-04 01:21:37
What determines the order that multiple DepdencyProperties on the same control get evaluated in? I am using the Extended WPF Toolkit PropertyGrid and have both SelectedObject and PropertyDefinitions bound: <extToolkit:PropertyGrid AutoGenerateProperties="False" SelectedObject="{Binding ActiveDataPoint}" PropertyDefinitions="{Binding ActiveDataPoint.Properties}"> The problem is that the OnSelectedObjectChanged fires from the dependency property, and in that changed handler it is referencing PropertyDefinitions, which it is seeing as null. If I comment out the OnSelectedObjectChanged handler

Databinding the DataGrid column header in code

雨燕双飞 提交于 2019-12-03 23:18:05
How do I databind a WPF Toolkit DataGrid column header value in code (not XAML)? DataGridColumn fooColumn = new DataGridTextColumn { Header = "Foo", Binding = new Binding {Path = new PropertyPath("BindingPath"), Mode = BindingMode.OneWay} }; This databinds the content of the cells of the column. But how do I databind the header text ("Foo") itself (to, say, a string property on a viewmodel)? Kent Boogaart DataGridColumn fooColumn = new DataGridTextColumn { Binding = new Binding {Path = new PropertyPath("BindingPath"), Mode = BindingMode.OneWay} }; BindingOperations.SetBinding(fooColumn,

WPF Datatrigger Visibility + Null Value

喜你入骨 提交于 2019-12-03 16:19:24
I'm beginner in WPF. I want to set Visibility to Hidden on a Radiobutton when the databind value is equal to Null. I'm using WPF Toolkit. This is my code but it doesn't work : <dg:DataGrid x:Name="dtGrdData" HorizontalScrollBarVisibility="Hidden" SelectionMode="Extended" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" CanUserSortColumns="False" AutoGenerateColumns="False" RowHeaderWidth="0" RowHeight="50" > <DataTrigger Binding="{Binding P_DAY_PRICE}" Value="{x:Null}"> <Setter Property="RadioButton.Visibility" Value="Hidden"></Setter> </DataTrigger> <dg:DataGrid

Need themes for the WPF Toolkit controls (especially the DataGrid)

你离开我真会死。 提交于 2019-12-03 15:25:01
I just downloaded the nice themes collection from the Codeplex WPF Themes site . I like the WhisterBlue and BureauBlue themes a lot, but neither contain any styles for the new controls included in the WPF Toolkit ( DataGrid , DatePicker , and Calendar ). It seems like someone out there must have extended the themes to cover these controls, but I've had no luck finding them. So, if you have any leads, I'd love to hear them. I should also mention that I've been trying to port a Silverlight version of the BureauBlue DataGrid theme to WPF (see: How do you port a theme from Silverlight to WPF? ),

DataGrid's CellEditingTemplate and focus in edit mode

南笙酒味 提交于 2019-12-03 15:22:39
问题 I am having an issue with WPFToolkit DataGrid when a column is customized supplying both CellTemplate and CellEditingTemplate . If you take a look below, you will see my editing template has a single CheckBox . All is fine in a functional sense but when F2 is hit to edit the cell, one must also hit TAB in order for the CheckBox to receive focus. Ideally, one would hit F2 and SPACE to toggle the value. Currently, one must hit F2, TAB, SPACE. I have tried setting TabIndex to no avail. I am

How to remove DataGrid's blank row when binding to a ObservableCollection<T>?

非 Y 不嫁゛ 提交于 2019-12-03 14:25:19
问题 I'm getting nuts here with this: ObservableCollection<Employee> list = new ObservableCollection<Employee>(); dgEmployees.ItemsSource = list; When you debug the list variable, it's empty (list.Count =0), but then I bind it to a DataGrid (WPFToolkit), it shows me a blank row. In immediate window, for dgEmployees.Items it's showing: dgEmployees.Items[0] {NewItemPlaceholder} and dgEmployees.Items[0].GetType() {Name = "NamedObject" FullName = "MS.Internal.NamedObject"} [System.RuntimeType]: {Name