wpf

How to repeat a XAML in WPF.

How to repeat a UI in WPF. I mean if I have dynamic records, and I want to display a UI block with labels and textboxes and other controls for each record how do I do that? All my data on the window is dynamic, nothing is static, Record 1 in database: test1 test11 d1 t1 t11 ...

Invoke KeyDown on WPF Control?

I have two entirely uncoupled WPF windows, however, if something particular is happening in window 1, I do want to invoke or 'simulate' a Key.Up/.Down on a control on the 2nd window. Is that possible? ...

WPF Poor Performace for static scenes with very small dynamic content.

I have a simple scene with 64 ModelUIElement3D elements, every element3d Model is a model group with 8 simple geometries, every geometry contains 3 materials, diffuse, specular and emissive. All materials use Solid Brushes since are the fastest. The geometries, specular material and diffuse material are Freeze to improve performance. ...

Crash (not caught by dispatcherunhandledexception nor app.unhandledexception)

Hi, I have a c# wpf app which crashes randomly and my error handling does not catch anything. Here is my error log: Version=1 EventType=APPCRASH EventTime=129271636864718697 ReportType=2 Consent=1 UploadTime=129271636865498698 ReportIdentifier=a87ddcc9-afd1-11df-89ed-002643aeed97 IntegratorReportIdentifier=a87ddcc8-afd1-11df-89ed-00264...

WPF window focus

I have an application (say App1). It has a datagrid that holds data items. If I right mouse click on a data item it brings up a "Item Details" window. However, App1 doesn't do this directly. Instead, it talks to another application, say App2, and App2 actually displays the "Item Details" window. My problem is as follows: 1. Bring up App2...

How would I loop through a collection in a separate thread and reflect the current item on the bound ListBox?

I have a ListBox bound to an ObservableCollection. The items in the collection each signify a different step with a method to perform that step. What I would like to do is have a BackgroundWorker loop through the collection, run each item's action method, and have the current step be reflected by the ListBox. My first iteration used n...

WPF -- Docking Inside MDI

I am not sure it is an appropriate question. But how to do docking inside a MDI. I have one control and I want this control can be dock able inside my MDI. I am using WPF VS 2010 with C#. Any thoughts. Thanks In Advance ...

uncheck SelectAll if one of row is unchecked

I have an issue. When I check SelectAllCheckBox all checkbox column in ListView is checked. But when I unchecked one of row checkbox the SelectAllCheckBox is still checked. How to uncheck SelectAllCheckBox if one of row is unchecked? And second question is how highlight ListView rows when SlectAllCheckBox is checked? My XAML <Window.Re...

Using WPF DataGridComboBoxColumn with MVVM - Binding to Property in ViewModel

I'm using the excellent MVVM Light Toolkit. My ViewModel exposes: public const string CourtCodesTypeCourtPropertyName = "CourtCodesTypeCourt"; private List<CourtType> _courtCodesTypes = new List<CourtType>(); public List<CourtType> CourtCodesTypeCourt { get { return _courtCodesTypes; } set { if (_co...

uncheck SelectAll if one of row unchecked

I have an issue. When I check SelectAllCheckBox all rows of checkbox column in ListView is checked. But when I unchecked one of row checkbox the SelectAllCheckBox is still checked. How to uncheck SelectAllCheckBox if one of row is unchecked? And second question is how to highlight ListView rows, for instabce, blue color when SelectAllChe...

Dynamically updating individual cells in a data grid

I have an observable collection of Taxis. The Taxi class has properties like Taxi_No, Name, Current_Locn, Bill_Amount. I have bound the observable collection to a wpf data grid. As a taxi is added or deleted from the collection, the changes are reflected in the data grid. But as the taxi moves through the city the location of the taxi c...

Requirements for running a Winforms app

Hi everyone, I'm an ASP.NET developer that has never done Winforms/WPF, but I need to create a calculator application that needs to run on ANY Windows platform since Winows XP. The app will go out to a number of people and we have no idea what version of Windows they're running. So my question is, what technology should I use to ensur...

How to Bind data to DataGridComboBoxColumn in DataGrid using MVVM

This is driving me crazy. I have a DataGrid which has a DataGridComboBoxColumn which I want the user to be able to use to select from. This is the basic outline of my grid. <DataGrid ItemsSource="{Binding GoalList}" DockPanel.Dock="Bottom" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridComboBoxColumn ItemsSource="{Binding Life...

Wpf: How do I set the target property on a label?

The following code: <TextBlock Name="foo"></TextBlock> <Label Target="foo">_Delta pressure</Label> Generates the following design time error: Error 1 Value 'foo' cannot be assigned to property 'Target'. Property 'Target' of type 'UIElement' cannot be specified as a string. C:\Programming\WpfCustomPlot\SPT.Olga.Plot.Custom...

Passing Input events from HwndHost to underlying WPF controls?

hi there, is there a way to pass input events (primarily mouse, but eventually keyboard input too) that occurs on a HwndHost back to the underlying WPF controls (e.g. a panel) ? i can hook up to WndProc within the HwndHost and recveive the windows messages. can i manually create a routedevent for a mouse click and send it to the parent...

How do I allow a ComboBox to have a selected value that is not in ItemsSource?

I have a ComboBox like this: <ComboBox IsEditable="True" ItemsSource="{Binding SelectableValues}" SelectedValue="{Binding SelectedValue}" /> SelectableValues is a list of double and SelectedValue is a double. If the user chooses a value from the list or manually enters one of those values, my SelectedValue propert...

How to solve a HasMany relation in MVVM to show up in one row in a datagrid

Hi, i have a class Auswahl with some plain properties and a property RefFilters of type List<RefAuswahlFilter> What i want to achieve is: Display all Auswahl Properties in a datagrid with all RefFilter items in ONE row. the Problem is, the count of RefFilter is different from auswahl to auswahl object. in the past i use a datatable as...

Making WPF user control mark click events as handled

I have a custom controls which propagates the mouse click event up the visual tree and I would like to get rid of this behaviour. Is there a way to mark a routed event (which was raised by button click or other mouse event) as handled from xaml in my UserControl. ...

WPF Binding a List<custom> to a combobox in C# code?

Hello, so I have a custom class in a list. I can't seem to get the list and a combobox to bind though. The list should display all the name values of the customclass. I want to do this in code. Any help most appreciated (as ever!). It's best if I give some code snippets I think. The class: public class Asset : IComparable<Asset> { ...

listview doesn't get updated after changing isSelected property

I use an ObservableCollection<customclass> with an isSelected property bound to a listview. The customclass items are added via asyncrhonous communication with a server. I register to an NotifyCollectionChanged event and there under certain conditions set the isSelected property to true. However, this doesn't update my view. Only after s...