wpf

Loop through all cells in Xceed DataGrid for WPF?

I am changing the background color of the cells when the user has made an edit. I would like to return all cells to normal colors when the changes are saved (or reverted). It's easy enough to set the cell's original background color (as stored in the parent row). But I can't figure out how to loop through all the cells in the table to r...

Wpf ItemTemplate CurrentItem

I have a simple ListBox.ItemTemplate containing a Label and a TextBox bound to a CSLA Bindable List. When I select the textbox the CurrentItem does not change, It only changes if I select the label. I have IsSynchronizedWithCurrentItem='True'. <ListBox x:Name="ItemsDataGrid" ItemsSource="{Binding Source={StaticResource ...

WPF TabControl ControlTemplate

Hi, I'm looking to create a new control template for a WPF tabcontrol. The situation I have is that there will be a number of tabs in the control and the user will be able to add and delete these tabs. Ideally I would like to create something along the lines of the Firefox / IE tabs whereby you have a delete button inside the tab headi...

ItemSource on wpf Combobox getting reset?

I have a combobox setup in xaml and have set the itemsource binding. When i run the project nothing shows up in the combobox. If i inspect it with snoop the itemsource of the combobox is blank. Anyone come across this before? I checked the binding errors this is the error it displays System.Windows.Data Error: 39 : BindingExpression...

Disable tabstop between columns in a WPF datagrid

I have a WPF Toolkit datagrid with mulitple columns. I am trying to get a behaviour where you can tab into the grid using tab, then tab out again using a single tab. E.g. I do not want to tab through all the columns or cells of the grid, just once in, and once out. Is there a simple solution, I have tried setting the TabNavigation to On...

Is there a list of Attribute classes that can be applied to a DependencyProperty?

I'm working on a problem that seems like it might be solved by applying an Attribute to the DependencyProperty. I got curious and I can't find documentation that lists all the XXXAttribute classes that apply to DependencyProperties and what the attributes are used for. Does anyone know of anything like that? If not, maybe post some at...

WPF/XAML: How do I size a window with no border?

I am using a window with no border and drawing the Chrome myself. I want to resize the window in a typical manner and have defined a 3x3 grid with the center being the content and the outer cells constituting the respective areas requiring different treatment (TopLeft/TopMiddle/TopRight... etc.) such as cursors. Maximize, Minimize, Mov...

Drawing 3D lines in WPF

Hi, I am working on a CAD application and thinking of using WPF for rendering my entities. But it seems like WPF doesnt support drawing 3D lines. Is there any ways for drawing 3D lines in WPF? I dont like to create a mesh for each line entity I need to draw as I am afraid, this would cause a major performance hitch for me as I would have...

How to create an overlay for each item in an ItemsControl?

I'm trying to decorate an ItemsControl so that each item will have a Delete button that floats over the item's content under a specific condition inspired by somewhat by the iPhone UI. I have a few ways in mind of how I can approach this but I could use some guidance from other WPF folks who might have a better idea about how this would ...

How can I define a IDataErrorInfo Error Property for multiple BO properties

I'm starting to implement validation in my WPF project via the IDataErrorInfo interface. My business object contains multiple properties with validation info. How do I get a list of ALL the error messages associated with the object. My thought is that thats what the Error property is for, but I cannot track down anyone using this for r...

WPF Grid and DataGrid sizing

The UserControl I'm trying to work with is essentially laid out like so: <Grid> <Grid.RowDefinitions> <Row Height="*"/> <Row Height="*"/> </Grid.RowDefinitions> <wpftoolkit:DataGrid x:Name="PrimaryGrid"/> <!-- ~10 rows --> <Border> <Grid> <Grid.RowDefinitions> <Row Height="*"/> ...

Changing text color on a WPF Calendar?

Is there a simple way to change the text color of a WPF Toolkit Calendar control? I thought it would be simple, but it appears that the color is hard-coded. To change it, I am going to have to go pretty deep into the control templates for the Calendar and its component parts. Doing so has some undesirable side effects. Here is an examp...

[C#] how to know the application is shutting down

There is a WPF application. i want to log when the application is closed. but i cannot modify the application (some restriction, just because business). So i create an invisible form component live inside the existing application, add as a dll library, so the existing application do not need to be modified. but the issue is, how can ...

How to show a loading graphic/animaiton when wpf data binding is taking place

I have a WPF user control that contains a data grid. I'm binding an observable collection of view models to it. Each view model has another collection of view models that I'm using to bind another data grid to. So the effect is a data grid with a nested data grid contained in the row details template. Normally the binding is quite quick...

Key Commands in WPF

How can I set key commands like if the user presses Ctrl + Shift + N, a new dialog or action happens. And do I have to make a new event for each key command? How can I do this. ...

WPF UI automation - Doesn't support rows? (or how can I select and deselect an entire row)

Note: This is no longer an issue, the .NET 4 built-in DataGrid solves this problem I have a WPF app which is using a DataGrid; I'm using the WPF ui automation API to write some automated tests for it. The DataGrid is the WPFToolkit one, I'm using the .NET 3.5SP1 with VS2008, and, the datagrid has multi-select enabled. Where I'm at is...

Dependent Comboboxes overwriting Data

I have a really weird situation with dependent comboboxes and I am about to pull my hair out!! I have 3 Comboboxes that display data from the selected item in a listview for editing. The DataContext for the UserControl is the Same as the Listbox. When I go select different items on the listbox the data in the 2nd and 3rd combo gets r...

How to put image "placemarkers" inside a scrollbar in WPF?

I have a long Scroll Viewer and I want to mark important spots with small images on the scroll bar. If the the image is clicked the scroll bar will jump to the corresponding content. I've seen this functionality in a few applications such as Eclipse and Chrome and was wondering how to reproduce it with WPF. ...

Listview overflowing - not keeping size of parent ?

Driving me crazy! I have a Listview to which I am binding a large collection. The problem is this collection "overflows" and then items can't be seen. If I set Height- then fine, I get what I want and a scroll bar... but this won't dynamically size if the user maximises the entire window. So how can I tell it to fill the size of the g...

Does Visibility = IsCollapsed skip the data-binding part?

If I set a StackPanel or what ever bound area I have as 'Collapsed', does the data load? Will it trigger its Loaded event? ...