wpftoolkit

conditional formatting in wpf toolkit datagrid

左心房为你撑大大i 提交于 2020-01-06 03:18:09
问题 hey i wanna change row foreground color according to a boolean in the model, whats the best way of doing it? 回答1: Define the style as following (IsBlah is a boolian property): <Style x:Key="MyRowStyle" TargetType="{x:Type dg:DataGridRow}"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="DarkBlue"/> <Style.Triggers> <DataTrigger Binding="{Binding IsBlah}" Value="False" > <Setter Property="Background" Value="DarkGray" /> <Setter Property="Foreground" Value=

Graph works on first tabitem but not second tabitem?

懵懂的女人 提交于 2020-01-05 03:35:52
问题 I am using Wpf Toolkit for the graph, and I realise that it doesn't work when I place it as the second tabitem. What could be the problem? This is my graph: <TabControl> <TabItem Header="PowerFlow"> </TabItem> <TabItem Header="Graph" Name="Graphs"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0,-28,0,28"> <Grid Height="921" Background="DarkGray"> <chartingToolkit:Chart Name="lineChart" Title="Power Graph" Background="YellowGreen" Foreground=

Coloring WPF DataGridRows one by one

泪湿孤枕 提交于 2020-01-04 11:40:07
问题 I'm making a WPF program which is able to color the rows in a DataGrid one by one in red using the for loop and I've encountered something weird. If the DataGrid has more than 40 rows of data from a database table, it doesn't color all the rows. Here's the code I'm using. private void Red_Click(object sender, RoutedEventArgs e) { for (int i = 0; i < dataGrid1.Items.Count; i++) { DataGridRow row = (DataGridRow)dataGrid1.ItemContainerGenerator.ContainerFromIndex(i); if (row != null) { row

Coloring WPF DataGridRows one by one

左心房为你撑大大i 提交于 2020-01-04 11:39:29
问题 I'm making a WPF program which is able to color the rows in a DataGrid one by one in red using the for loop and I've encountered something weird. If the DataGrid has more than 40 rows of data from a database table, it doesn't color all the rows. Here's the code I'm using. private void Red_Click(object sender, RoutedEventArgs e) { for (int i = 0; i < dataGrid1.Items.Count; i++) { DataGridRow row = (DataGridRow)dataGrid1.ItemContainerGenerator.ContainerFromIndex(i); if (row != null) { row

Silverlight/WPF charting toolkit. Can I change frequency of tick marks on CategoryAxis?

情到浓时终转凉″ 提交于 2020-01-04 02:09:27
问题 There is Interval property on LinearAxis but none on CategoryAxis. I need to control frequency of tick marks on X axis. The native logic does so many marks that I cant read even if I stretch the chart across 3 wide monitors!! 回答1: A couple of suggestions... 1.) CategoryAxis has a AxisLabelStyle property which you can use to set in a Style with a smaller FontSize, or a more condensed FontFamily 2.) CategoryAxis also has MajorTickMarkStyle which you can use to set the Line Stroke brush or

Using WPFToolKit's DataGridHyperlinkColumn

帅比萌擦擦* 提交于 2020-01-03 17:47:09
问题 I'm using WPFToolkit's Datagrid control. I can populate the datagrid, but I'm having trouble with the DataGridHyperlinkColumn. I would like it to visually display the link as the Person's name, but for the link to go to whatever UriLink's value is. How can I do this? What am I doing wrong? Xaml: <dg:DataGridHyperlinkColumn Header="Person Name" Width="200" Binding="{Binding Path=PersonName}" IsReadOnly="True" TargetName="{Binding Path=UriLink}"></dg:DataGridHyperlinkColumn> Alternatively, I

disable wpftoolkit chart datapoint

痞子三分冷 提交于 2020-01-03 11:19:12
问题 Does anybody know how to turn off the datapoints for a noraml LineSeries in a WPFToolkit chart? I find them to be very annoying, and not useful to my purposes, but I can't find a simple property or anything like that on the class itself. 回答1: You want to hide them? It is possible if to set the empty ControlTemplate to the Template property. Here is the example: <Window.Resources> <Style x:Key="InvisibleDataPoint" TargetType="{x:Type charting:DataPoint}"> <Setter Property="Background" Value=

How to implement busy indicator in application shell

怎甘沉沦 提交于 2020-01-03 05:56:08
问题 I am trying to implement the busy indicator from the WPF Extended Toolkit in my application's "shell." The goal is to implement the indicator in one place and then be able to set the IsBusy property from anywhere so that it can be initialized. Here is my shell: <Window x:Class="Foundation.Shell" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:Library.Controls.Views;assembly=Library" xmlns

WPF Toolkit Charting and IndependentValueBinding, IndependentValuePath

点点圈 提交于 2020-01-02 00:14:11
问题 I'm facing a problem with the charting engine from the WPF toolkit. I haven't moved the data to a proper object model, so the ItemSource is backed with a DataView . First attempt <chartingToolkit:ScatterSeries x:Name="TargetSeries" DataPointStyle="{StaticResource TargetStyle}" ItemsSource="{Binding Path=TargetSeriesData}" IndependentValueBinding="{Binding Path=TargetSeries_X}" DependentValueBinding="{Binding Path=TargetSeries_X}" /> This crashes because I believe the bindings are considered

WPF DataGridTemplateColumn. Am I missing something?

不想你离开。 提交于 2019-12-30 09:05:13
问题 <data:DataGridTemplateColumn Header="Name"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Name}"> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> <data:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <TextBox Text="{Binding Name}"> </DataTemplate> </data:DataGridTemplateColumn.CellEditingTemplate> </data:DataGridTemplateColumn> It's clear example of Template column, right? What could be wrong with that? So, here is the thing - when