wpftoolkit

Timepicker Updatesourcetrigger=propertychanged doesn't change value

对着背影说爱祢 提交于 2019-12-01 20:29:08
问题 I'm hosting a WPF usercontrol in a windows form In the wpf user control I am using a timepicker from wpfToolkit.extended If I use the up or downkeys or just enter a time in the textfield the source is not updated allthough I am using Updatesourcetrigger = propertychanged. When I select a time in the dropdrownlist everything works the way it should. This is the namespace of the toolkit. xmlns:xctk="clr-namespace:Xceed.Wpf.Toolkit;assembly=WPFToolkit.Extended" This is the xaml for the

WPF: How do I set the focus on a datagrid to a specific row?

安稳与你 提交于 2019-12-01 19:38:41
问题 I would like to set the focus on the first row of a data grid. This is what I have so far: Keyboard.Focus(ResultsGrid) If result.Count > 0 Then ResultsGrid.SelectedIndex = 0 End If This will set the focus to the datagrid, but not the row itself. 回答1: After selecting the row you will have to set the focus on the row in the following way: ResultsGrid.SelectedIndex = index; DataGridRow row = (DataGridRow)ResultsGrid.ItemContainerGenerator.ContainerFromIndex(index); row.MoveFocus(new

WPF: How do I set the focus on a datagrid to a specific row?

谁说胖子不能爱 提交于 2019-12-01 18:19:26
I would like to set the focus on the first row of a data grid. This is what I have so far: Keyboard.Focus(ResultsGrid) If result.Count > 0 Then ResultsGrid.SelectedIndex = 0 End If This will set the focus to the datagrid, but not the row itself. After selecting the row you will have to set the focus on the row in the following way: ResultsGrid.SelectedIndex = index; DataGridRow row = (DataGridRow)ResultsGrid.ItemContainerGenerator.ContainerFromIndex(index); row.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); Try this: yourDataGrid.SelectedItem = yourDataGrid.Items[i]; 来源: https

Get the multiple selected Row in data-grid in WPF?

旧时模样 提交于 2019-12-01 10:59:45
I want to get the multiple selection of data-grid in WPF, as my the business requirement I have a customer table in data grid which allows multiple selection and radio button (ALL, Selected, All but selected). If the selected or all but selected is clicked the I have to pull data only for those customers which are selected in the data- grid. Please advice solution to get multiple selected row of data grid. Thanks. I have got a solution for the above question, //CustomerDTO is the DTO class which has all the column names of Customer Table. //dgUsers is the data grid. List<CustomerDTO>

SelectedColor binding doesn't update from ColorPicker to Model

前提是你 提交于 2019-12-01 10:39:32
I have a WPF application where I need to allow to change appearance (backgrounds and foreground mostly). So i bind them to dynamic resources which defined application-wide in App.resources . I also decided to use a ColorPicker from wpftoolkit (v2.5.0) in my Settings window simplified example App.xaml <Application x:Class="WpfColors.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <SolidColorBrush x:Key="BgBrush" Color="Gray"/> </Application.Resources> </Application

initial image in WPF Image Control

南笙酒味 提交于 2019-12-01 08:35:40
I have a WPF Image Control in my project that loads from internet (lazy loading), i want to show a initial image in Image Control until main image load. plz help me <DataTemplate DataType="{x:Type local:MyData}"> ... <Image Width="50" Height="50" Source="{Binding Path=profile_image_url_https, FallbackValue=profile_image_url_https}" HorizontalAlignment="Left"> ... </DataTemplate> You might be able to make it work using TargetNullValue on the binding, only set the image property when it is loaded. e.g. <BitmapImage x:Key="DefaultImage" UriSource="Images/Error.ico" /> <Image Source="{Binding

SelectedColor binding doesn't update from ColorPicker to Model

我的梦境 提交于 2019-12-01 08:22:42
问题 I have a WPF application where I need to allow to change appearance (backgrounds and foreground mostly). So i bind them to dynamic resources which defined application-wide in App.resources . I also decided to use a ColorPicker from wpftoolkit (v2.5.0) in my Settings window simplified example App.xaml <Application x:Class="WpfColors.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml">

Get the multiple selected Row in data-grid in WPF?

纵然是瞬间 提交于 2019-12-01 07:22:57
问题 I want to get the multiple selection of data-grid in WPF, as my the business requirement I have a customer table in data grid which allows multiple selection and radio button (ALL, Selected, All but selected). If the selected or all but selected is clicked the I have to pull data only for those customers which are selected in the data- grid. Please advice solution to get multiple selected row of data grid. Thanks. 回答1: I have got a solution for the above question, //CustomerDTO is the DTO

initial image in WPF Image Control

坚强是说给别人听的谎言 提交于 2019-12-01 06:54:50
问题 I have a WPF Image Control in my project that loads from internet (lazy loading), i want to show a initial image in Image Control until main image load. plz help me <DataTemplate DataType="{x:Type local:MyData}"> ... <Image Width="50" Height="50" Source="{Binding Path=profile_image_url_https, FallbackValue=profile_image_url_https}" HorizontalAlignment="Left"> ... </DataTemplate> 回答1: You might be able to make it work using TargetNullValue on the binding, only set the image property when it is

WPFToolkit DataGrid: Combobox column does not update selectedvaluebinding immediately

坚强是说给别人听的谎言 提交于 2019-12-01 05:50:41
I'm using WPF Toolkit DataGrid and DataGridComboBoxColumn. Everything works well, except that when selection change happens on the combobox, the selectedvaluebinding source is not updated immediately. This happens only when the combobox loses focus. Has anyone run into this issue and any suggestions solutions ? Here's the xaml for the column: <toolkit:DataGridComboBoxColumn Header="Column" SelectedValueBinding="{Binding Path=Params.ColumnName, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="cName" SelectedValuePath="cName"> <toolkit:DataGridComboBoxColumn.ElementStyle> <Style