wpftoolkit

How can I apply a custom sort rule to a WPF DataGrid?

余生长醉 提交于 2019-12-27 11:43:27
问题 When the user does a column sort in my DataGrid , I want all null or empty cells to be sorted to the bottom, rather than the top. I wrote an IComparer<T> that makes sure blanks are always sorted downward, but I can't figure out how to apply it to the columns of my DataGrid . Note that the initial sort of the DataGrid , which I'm doing with the LINQ OrderBy() method, works great. The problem is that all subsequent sorts performed by the user sort the blanks to the top. Comparer Code public

Display issue with WPF toolkit Color Picker inside toolbar

為{幸葍}努か 提交于 2019-12-25 01:34:30
问题 Following XAML in WPF is displaying the dropdown button of the WPF Toolkit's Color Picker outside the toolbar as shown in the screenshot below. Question : How can I make the dropdown button display inside the toolbar (something similar to what we have in MS WORD toolbar's color picker)? Obviously, I'm missing something in the XAML below. Screenshot of the Toolbar with Color Picker : <DockPanel Margin="0,0,660,0"> <ToolBarTray> <ToolBar> <Button Command="New" Content="New" /> <Button Command=

Autocompletebox doesn't clear keyboard strokes

流过昼夜 提交于 2019-12-24 08:47:34
问题 In an application of mine, I'm using the WPF autocomplete box from the wpf toolkit. I'm implementing it via the MVVM pattern. The binding works fine, but I have a small problem when trying to clear the content of the autocompletebox. Setting the bound property in the viewmodel to null, clears the text only partially (all text entered via the keyboard is not cleared - i.e. if I enter CH when fetching all the cities and select Chicago and the set the bound property to null, the CH is not being

How to set focus on NumericUpDown control?

≯℡__Kan透↙ 提交于 2019-12-24 05:53:54
问题 I am trying to set focus on NumericUpDown element from WPFs extended toolkit. I heve following XAML <Window ... xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" <Grid> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" FocusManager.IsFocusScope="True"> <extToolkit:NumericUpDown HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="ItemsCount" Value="1"/> <TextBlock Text="XXX" Margin='10,0,0,0'/> <

How to stop showing decimal points in Y Axis in WPF DataVisualization charts

前提是你 提交于 2019-12-23 21:01:11
问题 I am using WPF DataVisualization chart control to show some sample data. My problem is Y axis is showing decimal values. How can I make it show only integer values. This is my XAML code for the <chartingToolkit:Chart Margin="0,30,0,30" Name="columnChart" Title="" Foreground="Black" > <chartingToolkit:ColumnSeries DependentValuePath="Value" Background="Red" IndependentValuePath="Key" ItemsSource="{Binding}" > <chartingToolkit:ColumnSeries.DataPointStyle> <Style TargetType="Control"> <Setter

WPF DataGrid inside Accordion height issue

≯℡__Kan透↙ 提交于 2019-12-23 09:33:03
问题 I am using the latest WPF Toolkit but am running into a height issue when I have a large record set bound into a DataGrid inside an AccordionItem item. The height of the Accordion itself scales nicely but the DataGrid inside the accordion control doesn't get get a ScrollBar or get constrained in any way so the records are hidden. I know that I am most probably missing something very simple (like a binding from the DataGrid 's height property to the Accordion but that seems messy) here is a

ContextMenu's MenuItem DataContext returns old items

馋奶兔 提交于 2019-12-23 09:22:40
问题 I am using a ContextMenu within a LongListSelector so that I can delete some items in the list bounded to the LLS. I am following a recent guide here in order to implement the LLS (though I am not using the JumpList). The only thing I've changed is to have the base group class extend ObservableCollection instead of List. The issue I am having is that once I've implemented the ContextMenu and delete from there, I can delete from the same "location" in teh visible list twice and then it would

Freezing columns in wpf datagrid

…衆ロ難τιáo~ 提交于 2019-12-23 06:49:31
问题 I have some tabular data which has a lot of fields in it, and when my WPF application is resized a lot of them are cut off. However, I want to see the first 6 columns always as they are important. How can I achieve this in a grid format? I am using the WPFToolkit DataGrid but can be persuaded to change to a different control if one exists. Right now, I am using two different DataGrids side by side with the right most datagrid inside a scrollviewer with horizontal scrolling on and the vertical

Assigned independent axis cannot be used. This may be due to an unset Orientation property for the axis.in wpf chart c#

无人久伴 提交于 2019-12-23 05:40:30
问题 I want implement rotation and interval of axis label on x axis with LinearAxis in code behind. lineSeria = new LineSeries(); linAxis = new LinearAxis(); linAxis.Orientation = AxisOrientation.X; linAxis.Location = AxisLocation.Bottom; linAxis.Interval = 10; var xLabel = new Style(typeof(AxisLabel)); var rotation = new Setter(AxisLabel.RenderTransformProperty, new RotateTransform() { Angle = -90, CenterX = 50, CenterY = 1 } ); xLabel.Setters.Add(rotation); linAxis.AxisLabelStyle = xLabel;

How can I search into database with WPF and Linq-to-entities model

安稳与你 提交于 2019-12-23 05:00:27
问题 I prepare a WPF project, where I want to implement a more complex search. I use LINQ to entities through the ADO.NET Entity model and plan to do the display in WPFToolkit DataGrid. My search window should allow search by a few different criteria. My idea is to be able to write in (for example) name, surname and occupation textboxes in the application and receive a list of all people in the selected table that correspond to all 3 search parameters. I want to be able to search when all are