wpf

WPF datagrid live-update with button-column

Dear All! I have a datagrid which contains bid and ask - prices for currency-symbols. The data is updated every seconds. I update the data by creating a new collection of my viewmodel-entities and bind this collection to the datagrid every second. The problem is: Because my datagrid contains a template-column with a button "buy", this ...

is it possible to write data to a collection in wpf?

Hello. In looking through samples I have seen a number of examples where it is possible to present data within a wpf applicaiton by binding to collections. However I was wondering is it possible to write to a collection from an applicaiton. Say for example i have 2 or more fields such as names and I wanted to have hte ability to add up t...

WPF exception handling when launched from WinForms

so i came across this interesting article on WPF exception handling: http://srtsolutions.com/public/item/251263 it works by declaring DispatcherUnhandledException handler in xaml <application> node. but what if a WPF window is launched from win forms application? where can i declare a general exception handler? The problem is that...

WPF Commands vs Events Advantages/Disadvantages

Can anyone tell me what are the advantages of using Commands vs Events in WPF. Do Commands or Events run into memory leaks? What is the fastest approach. What are their disadvantages. ...

lob app editing dialogs wpf silverlight

Are modal dialogs passe for letting the user add or edit something in a modern lob application? Is there a clear alternative (I'm thinking some type of view port)? Does anyone have any links to a slick reference lob app? Cheers, Berryl ...

WPF bind IsEnabled on other controls if a listbox has a select item

I have a grid with 2 columns, a listbox in column 0 and a number of other controls in the a secondary grid in the main grids column 1. I want this controls only to be enabled (or perhaps visible) if an items is selected in the listbox through binding. I tried on a combo box: IsEnabled="{Binding myList.SelectedIndex}" But that does n...

Why does my GridSplitter not work at all?

I'm migrating a WinForms app to WPF. Everything has gone well so far except in relation to my attempts to use GridSplitter which I can never seam to make resize anything at run-time. To make sure it wasn't just my code I attempted to compile the GridSplitter sample from LearnWPF.com and it doesn't appear to work either. I am expecting t...

WPF DataGrid SelectedItems - keeping multiple selected while left clicking.

is there a way to mimic the behavior of ctrl+click which keeps previously selected rows selected and just adds more selected items? by default, when clicking on each row, all previously selected rows get de-selected. one way to achieve this, would be to override SelectionChanged event, and re-select removed rows. void TestGrid_Sele...

Inheriting from DataGridTextColumn and overriding GenerateElement

I'm attempting to create a custom DataGrid where I can format individual cells based on the cell value (ie; red text for negative values, green for postitive) ala this approach... http://stackoverflow.com/questions/686165/how-to-get-binding-value-of-current-cell-in-a-wpftoolkit-datagrid I also need to convert the values from negative t...

WPF - Relative transform on brush results in jagged lines.

After applying a relative rotate transform (of 45 degrees) on a brush in WPF, I am left with extremely jagged lines. Has anyone else experienced this? Did you find a solution? ...

WPF 2D image binding performance

I have a high speed camera that I am displaying in a WPF control. The camera's SDK provides me with an array of bytes representing the image data. I'm looking for the most efficient way to bind to these images on a Canvas control. These images are displayed side-by-side from a collection capped at 20 images. My current method does work ...

which is the best or widely used MVVM Toolkit for WPF?

Could you tell me which is the best MVVM pattern someone have to follow (like Prism). Where can I find hands-on examples to help? Actually, I am little confused which one to follow? ...

Best book / content for .NET 3.5

Hi, I want to study new .NET 3.5 concepts like WPF, WCF for work as well as for interviews. I am aware of .NET 2 but do not have any detailed knowledge of .NET 3.5 and newly added features in .NET 3.5 and C#. is there any good book/ online resource which would help me? ...

WPF Textblock Convert Issue

am usina text block in usercontrol, but am sending value to textblock from other form, when i pass some value it viewed in textblock, but i need to convert the number to text. so i used converter in textblock. but its not working <TextBlock Height="21" Name="txtStatus" Width="65" Background="Bisque" TextAlignment="Center" Text="{Bindin...

WPF Performance Suite Visual Profiler does not work

Hi I have installed the lasted Windows 7 SDK which countains .4 profiler. I ran the WPF perf suite. Perforator does display some data when i launch my app. But visual profiler does not display anything !!?? The timeline moves but not data is collected... Any idea ? Thanks Jonathan ...

My ListView or ListBox control size doesn't shrink when there is a complex data template which hides display elements based on triggers?

I have a ListView element with a DataTemplate for each ListViewItem defined as follows. When run, the ListView's height is not collapsed onto the items in the view, which is undesirable behavior: <DataTemplate x:Key="LicenseItemTemplate"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <...

Regarding the ViewModel

Im struggling to understand the ViewModel part of the MVVM pattern. My current approach is to have a class, with no logic whatsoever (important), except that it implements INotifyPropertyChanged. The class is just a collection of properties, a struct if you like, describing an as small part of the data as possible. I consider this my Mod...

Visibility.Collapse does not work in WPF

Visibility.Collapse doesnt work in my case. below is the XAML. If i try to hide the lblCountry and cmbCountry a white space is shown between zip and practice fields. There is no option to hide an entire row of a Grid. <Grid> <Canvas Name="canDemographic" > </Canvas> <Grid HorizontalAlignment="Center" VerticalAlignmen...

How to build a generic/re-usable modal dialog for WPF following MVVM

I would like to build a generic/re-usable modal dialog that I can use in our WPF (MVVM) - WCF LOB application. I have a Views and associated ViewModels that I would like to display using dialogs. Bindings between Views and ViewModels are done using Type-targeted DataTemplates. Here are some requirements that I have been able to draft: ...

Bind the value of a parameter in an ObjectDataProvider in WPF

I would like to be able to be doing this : <ObjectDataProvider x:Key="dataProvider" ObjectInstance="uiRoot:App.Current.Controller" MethodName="GetMyViewModel"> <ObjectDataProvider.MethodParameters> <system:Int32>{Binding Id}</system:Int32> </ObjectDataProvi...