Search Results

Search found 94 results on 4 pages for 'wpftoolkit'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Nested ComboBox doesn't update source by selection.

    - by Shimmy
    Hello. I am using a ComboBox bound under a DataContext: <tk:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding Source={StaticResource CategoriesCollection}" DisplayMemberPath="Title" SelectedItem="{Binding Category}" /> </DataTemplate> </tk:DataGridTemplateColumn.CellEditingTemplate> When the row is initiated the value of Category is null. Once I select the first value in the ComboBox it sets it up. But when I select another value, it doesn't get changed.

    Read the article

  • Unable to display data in a WPF datagrid that has a DataView instance as the items source

    - by Jimmy W
    I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two columns are defined to contain double data types. When the application exits the function that calls the binding as expressed in the declaration, The DataGrid object displays data for the first column, but not the other columns. When I type the following in the immediate window in the debugger: ((DataRowView)WeatherGrid.Items[0]).Row[1] I get a number, but this doesn't correspond with what is being displayed. Why is only the first column visible, and how can I get all of the data to be visible? I'll leave my XAML definition for the DataGrid object below: <toolkit:DataGrid Margin="12.726,77.71,12,0" Name="WeatherGrid" Height="500" Grid.Row="1" VerticalAlignment="Top" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" />

    Read the article

  • WPF Toolkit DataGrid Performance Issue

    - by Ankush
    Hi All, I am facing a performance issue with WPF Toolkit datagrid. In my application I have created a view containing multiple Data Grids (around 25) with about 5 rows in each grid. The grids are placed in an ListView, the problem I am facing is of rendering of my view. Can anyone guide me to resolve the issue. Thanks

    Read the article

  • checkbox like radiobutton wpf c#

    - by rockenpeace
    i have investigated this problem but this is solved in design view and code-behind. but my problem is little difference: i try to do this as only code-behind because my checkboxes are dynamically created according to database data.In other words, number of my checkboxes is not stable. i want to check only one checkbox in group of checkboxes. when i clicked one checkbox,i want that ischecked property of other checkboxes become false.this is same property in radiobuttons. i take my checkboxes from a stackpanel in xaml side: <StackPanel Margin="4" Orientation="Vertical" Grid.Row="1" Grid.Column="1" Name="companiesContainer"> </StackPanel> my xaml.cs: using (var c = new RSPDbContext()) { var q = (from v in c.Companies select v).ToList(); foreach (var na in q) { CheckBox ch = new CheckBox(); ch.Content = na.Name; ch.Tag = na; companiesContainer.Children.Add(ch); } } foreach (object i in companiesContainer.Children) { CheckBox chk = (CheckBox)i; chk.SetBinding(ToggleButton.IsCheckedProperty, "DataItem.IsChecked"); } how can i provide this property in checkboxes in xaml.cs ? thanks in advance..

    Read the article

  • How do I add VisualStateManager to my Surface project?

    - by AskAboutGadgets
    I have a surface project and I would like to use controls designed in Blend. I added these controls to my microsoft surface project, but I receive an error when I try to compile it. Error 1 The tag 'VisualStateManager.VisualStateGroups' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. Line 12 Position 4. UserControl1.xaml 12 4 How can I solve this issue? Can I use the VisualStateManager in Surface application at all?

    Read the article

  • Nested WPF DataGrids

    - by jvberg
    I have a DataGrid (from the toolkit) and I want to nest another DataGrid in the DataGrid.RowDetailsTemplate. The trick is I want to bring back the data from one table in the main grid and then based on row selection go and get additonal detail from a different table and show it in the DataGrid in the detail template. This is easy enough to do in 2 seperate DataGrids but I am having trouble getting it to work with the nested version. Is this even possible? If so, could someone point me in the right direction. I should note I am using LinqToSql clases to populate the data. Thanks for your consideration. -Joel

    Read the article

  • Dynamcally resizing an open Accordion

    - by alavers
    I have an Accordion and the height of its content can be dynamically resized. I would like to see the Accordion dynamically respond to the child item's height, but I'm having trouble doing this. <lt:Accordion Name="MyAccordion" SelectionMode="ZeroOrOne" HorizontalAlignment="Stretch"> <lt:AccordionItem Name="MyAccordionItem" Header="MyAccordion" IsSelected="True" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"> <StackPanel> <Button Content="Grow" Click="Grow"/> <Button Content="Shrink" Click="Shrink"/> <TextBox Name="GrowTextBox" Text="GrowTextBox" Height="400" Background="Green" SizeChanged="GrowTextBox_SizeChanged"/> </StackPanel> </lt:AccordionItem> </lt:Accordion> private void Grow(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height += 100; } private void Shrink(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height -= 100; } private void GrowTextBox_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e) { MyAccordion.UpdateLayout(); MyAccordionItem.UpdateLayout(); } Mind you, if I collapse and then re-open the accordion, it takes shape just the way I want, but I'd like this resizing to occur immediately when the child resizes. I feebly attempted to fix this by adding a SizeChanged event handler that calls UpdateLayout() on the Accordion and AccordionItem, but this doesn't have any visual effect. I can't figure out where proper resizing takes place inside the Accordion control. Does anyone have an idea?

    Read the article

  • How can I avoid the overflow when wheel scolling WPF DataGrid

    - by Jan Bannister
    When I use the mouse wheel to scroll the WPF Toolkit DataGrid on a Vista 64 Machine I get a cryptic low level error: at System.IntPtr.op_Explicit(IntPtr value) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) I logged an issue on CodePlex. But has anyone found a way to resolve this already?

    Read the article

  • Binding update on adds news series to WPF Toolkit chart (instead of replacing/updating series)

    - by Mal Ross
    I'm currently recoding a bar chart in my app to make use of the Chart class in the WPF Toolkit. Using MVVM, I'm binding the ItemsSource of a ColumnSeries in my chart to a property on my viewmodel. Here's the relevant XAML: <charting:Chart> <charting:ColumnSeries ItemsSource="{Binding ScoreDistribution.ClassScores}" IndependentValuePath="ClassName" DependentValuePath="Score"/> </charting:Chart> And the property on the viewmodel: // NB: viewmodel derived from Josh Smith's BindableObject public class ExamResultsViewModel : BindableObject { // ... private ScoreDistributionByClass _scoreDistribution; public ScoreDistributionByClass ScoreDistribution { get { return _scoreDistribution; } set { if (_scoreDistribution == value) { return; } _scoreDistribution = value; RaisePropertyChanged(() => ScoreDistribution); } } However, when I update the ScoreDistribution property (by setting it to a new ScoreDistribution object), the chart gets an additional series (based on the new ScoreDistribution) as well as keeping the original series (based on the previous ScoreDistribution). To illustrate this, here are a couple of screenshots showing the chart before an update (with a single data point in ScoreDistribution.ClassScores) and after it (now with 3 data points in ScoreDistribution.ClassScores): Now, I realise there are other ways I could be doing this (e.g. changing the contents of the original ScoreDistribution object rather than replacing it entirely), but I don't understand why it's going wrong in its current form. Can anyone help?

    Read the article

  • How to listen for AffectsParentArrange events when you're not the parent

    - by Jeff B
    There is an attribute "AffectsParentArrange" that implicitly invalidates the parent's layout - but I want to attach an event handler to the "event" triggered by that attribute. When a child property with the attribute changes, the parent's arrangement is invalidated. I have a custom control (which is not the immediate parent) that needs to receive an event. Does anyone know of an event that can be used here? Do I need to provide a custom parent that overrides a method and fires an event?

    Read the article

  • How can I prevent row selection in the WPF Toolkit DataGrid?

    - by Kilhoffer
    I see a few options available for row selection, but 'No Selection' is not one of them. I've tried handling the SelectionChanged event by setting SelectedItem to null, but the row still seems selected. If there is no easy support for preventing this, would it be easy to just style the selected row the same as an unselected one? That way it could be selected, but the user has no visual indicator.

    Read the article

  • Styling WPF Toolkit DataGrid Column Headers

    - by ChrisFletcher
    Hi, I'm having an issue styling the WPF Datagrid, I've styled the column headers (of type ColumnHeader). But when the data in the columns does not fill the full width of the grid an additional column is added to pad out the grid. This column ignores the ColumnHeader style and looks out of place presumably because the element has a different type, I've looked through the library in object browser but I can't find this element. I've also considered fixing the sizes so this column is unnecessary but thats not a viable option. The problem is demonstrated in the following article: http://blogs.msdn.com/jaimer/archive/2009/01/20/styling-microsoft-s-wpf-datagrid.aspx The element I mean is in the top right, just to the right of green column 3 and just above the cell with the row background arrow.

    Read the article

  • how to make changes to database in WPF?

    - by user353573
    Drag access database into designer xsd, toolkit:datagrid get datacontext from resources correctly show the table content through this binding. Press button in the button column, can show each row correctly. delete row and add row also work in datagrid however, when i press button column to add a new row or delete a row, there is no change in the underlying database, how to commit the changes from datagrid to database in WPF if not using ADO.net ? The following code is what i try do not work private void datagrid2_delete(object sender, RoutedEventArgs e) { Button showButton = (Button)sender; //person p = (person)showButton.DataContext; DataRowView ds = (DataRowView)showButton.DataContext; //DataSet1.customertableRow p = (DataSet1.customertableRow)ds; //ds.BeginEdit(); //ds.Delete(); //ds.EndEdit(); /* DataSourceProvider provider = (DataSourceProvider)this.FindResource("Family"); WpfApplication1.DataSet1.customertableDataTable table = (WpfApplication1.DataSet1.customertableDataTable)provider.Data; table.AddcustomertableRow("hello3", 5, System.DateTime.Today); table.AcceptChanges(); }

    Read the article

  • Dynamcally resising an open Accordion

    - by alavers
    I have an Accordion and the height of its content can be dynamically resized. I would like to see the Accordion dynamically respond to the child item's height, but I'm having trouble doing this. <lt:Accordion Name="MyAccordion" SelectionMode="ZeroOrOne" HorizontalAlignment="Stretch"> <lt:AccordionItem Name="MyAccordionItem" Header="MyAccordion" IsSelected="True" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"> <StackPanel> <Button Content="Grow" Click="Grow"/> <Button Content="Shrink" Click="Shrink"/> <TextBox Name="GrowTextBox" Text="GrowTextBox" Height="400" Background="Green" SizeChanged="GrowTextBox_SizeChanged"/> </StackPanel> </lt:AccordionItem> </lt:Accordion> private void Grow(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height += 100; } private void Shrink(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height -= 100; } private void GrowTextBox_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e) { MyAccordion.UpdateLayout(); MyAccordionItem.UpdateLayout(); } Mind you, if I collapse and then re-open the accordion, it takes shape just the way I want, but I'd like this resizing to occur immediately when the child resizes. I feebly attempted to fix this by adding a SizeChanged event handler that calls UpdateLayout() on the Accordion and AccordionItem, but this doesn't have any visual effect. I can't figure out where proper resizing takes place inside the Accordion control. Does anyone have an idea?

    Read the article

  • WPF DataGrid, Help with Binding to a List<X> where each X has a Dictionary<Y,object> property.

    - by panamack
    I'm building an application which helps someone manage an event and works with data originating from Excel. I want to use the WPF Toolkit DataGrid to display the incoming data but can't guarantee how many Columns there are going to be or what information they will contain. I'd like to have an Info class that stores column information and have each Visitor at my Event own a Dictionary that uses shared references to Info objects for the keys. Here's the general gist: public class Info{ public string Name{get;set;} public int InfoType{get;set;} } public class Visitor{ public Dictionary<Info,object> VisitorInfo {get;set;} } public class Event{ public List<Visitor> Visitors{get;set;} public Event(){ Info i1 = new Info(){ Name = "ID", InfoType = 0};// type 0 for an id Info i2 = new Info(){ Name = "Name", InfoType = 1};// type 1 for a string Info i3 = new Info(){ Name = "City", InfoType = 1}; Visitor v1 = new Visitor(); v1.VisitorInfo.Add(i1, 0); v1.VisitorInfo.Add(i2, "Foo Harris"); v1.VisitorInfo.Add(i3, "Barsville"); Visitor v2 = new Visitor(); ... this.Visitors.Add(v1); this.Visitors.Add(v2); ... } } XAML: <!-- Window1.xaml --> ... <local:Event x:Key="MyEvent"/> ... <wpftk:DataGrid DataContext="{StaticResource MyEvent}" ItemsSource="{Binding Path=Visitors}" /> Disappointingly, DataGrid just sees a collection of Visitors each having a VisitorInfo property and displays one column called VisitorInfo with the string "(Collection)" once for each Visitor. As a workaround I've created a ListTVisitorToDataTableConverter that maps Infos to DataColumns and Visitors to DataRows and used it like this: <wpftk:DataGrid DataContext="{StaticResource Event}" ItemsSource{Binding Path=Visitors, Converter={StaticResource MySmellyListTVisitorToDataTableConverter}}" /> I don't think this is good though, I haven't started trying to convert back yet which I guess I'll need to do if I want to be able to edit any data! How can I do better? Thanks.

    Read the article

  • DataGrid SelectionChanged happens too often

    - by Tokk
    Hey, Guys As I have a DataGrid as another DataGrid's RowDetailsTemplate, I've got a strage effekt. If I Change selection in my inner DataGrid, the SelectionChanged-Method in the outer Grid is automatically caled, too. I don't know why, but I would like to know, what I can do against this. Thx

    Read the article

  • Column Header Styling Issue in Data Grid in WPF

    - by sbrakl
    I have formated the Wcf Toolkit Datagrid and below in the is the ColumnHeader Style for it But, there are still some area in Column Header, which are not styled as shown in the image http://www.freeimagehosting.net/uploads/9aba4fbd93.jpg <Style x:Key="ColumnHeaderStyle" TargetType="{x:Type dg:DataGridColumnHeader}"> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Background" Value="Orange" /> <Setter Property="Foreground" Value="White" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="dg:DataGridColumnHeader"> <dg:DataGridHeaderBorder x:Name="headerBorder" Background="Orange"> <Border BorderThickness="2" CornerRadius="5" Background="Orange" BorderBrush="DarkOrange"> <Grid> <TextBlock Text="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"/> </Grid> </Border> </dg:DataGridHeaderBorder> </ControlTemplate> </Setter.Value> </Setter> </Style> <dg:DataGrid Grid.Row="1" Grid.RowSpan="1" Name="dgQuestion" HorizontalAlignment="Left" AutoGenerateColumns="True" Width="740" MinWidth="200" MaxWidth="740" Background="Wheat" ColumnHeaderHeight="30" ColumnHeaderStyle="{DynamicResource ColumnHeaderStyle}" RowStyle="{StaticResource RowStyle}" CanUserAddRows="False" CanUserDeleteRows="False" AlternationCount="2"/>

    Read the article

  • WPF/C# - Sometimes my dropdowns/datepickers will stop functioning?

    - by BlargINC
    Q: Where should I check to track this down? Issue: Opening a view model in my application sometimes makes dropdowns/datepickers nonfunctional. ie. dropdown won't drop and the datepicker calendar won't come up I suspect a binding issue but don't see one. Dropdowns have normal things like strings, numbers. One drop has a list of mini views. Datepickers are bound to nullable dates set in the constructor of the viewmodel. Note: These same things work in other viewmodels/views. I can paste code, I'm just not sure what code is relevant here. Thank you for helping me :)

    Read the article

  • Sometimes my dropdowns/datepickers will stop functioning?

    - by BlargINC
    Q: Where should I check to track this down? Issue: Opening a view model in my application sometimes makes dropdowns/datepickers nonfunctional. ie. dropdown won't drop and the datepicker calendar won't come up I suspect a binding issue but don't see one. Dropdowns have normal things like strings, numbers. One drop has a list of mini views. Datepickers are bound to nullable dates set in the constructor of the viewmodel. Note: These same things work in other viewmodels/views. I can paste code, I'm just not sure what code is relevant here.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >