wpf

Is Silverlight appropriate for a big LOB application

So I'm at the proof of concept stage for a fairly large LOB application. The application will be deployed to many desktops (200+) in many organisations. It will contain lots of CRUD type screens (around 100), along with some pretty complex processes like invoice generation and financial ledger integration. It will also contain lots of re...

Best way to keep ObservableCollection and ObjectContext in sync?

Hi, I have window with a listbox bound to an ObservableCollection of People (a set of entity framework objects that I retrieve in response to a users query: a search box), i then have functions such as Edit, Delete and Add New. At the moment i am simply making sure that each time i Add or Remove something from the Database that i also ...

How can I bind the nested viewmodels to properties of a control

I used Microsoft's Chart Control of the WPF toolkit to write my own chart control. I blogged about it here. My Chart control stacks the yaxes in the chart on top of each other. As you can read in the article this all works quite well. Now I want to create a viewmodel that controls the data and axes in the chart. So far I'm able to add a...

WPF Communication from Page/Frame to Window

I've built a simple WPF app which navigates through pages in a frame, but one of the frames is a picture viewer and I want it so that if someone double clicks on the picture that it goes full screen (i.e. outside the frame). What's the best way to do this in WPF? ...

Is there a way to make a XAML textbox validate on int or double without custom ValidationRules?

I have some XAML textboxes that need to allow nothing but double and some that need to allow nothing but int. I could use Binding.ValidationRules with all its code behind, triggers, styles as described here, but isn't there a way for these simple validations to use an attribute something like this, just so nothing but that type can be ...

WPF Watermark PasswordBox from Watermark TextBox

I am using a Watermark textbox as in Watermark TextBox in WPF <Grid Grid.Row="0" Background="{StaticResource brushWatermarkBackground}" Style="{StaticResource EntryFieldStyle}" > <TextBlock Margin="5,2" Text="This prompt dissappears as you type..." Foreground="{StaticResource brushWatermarkForeground}" Visib...

WPF listbox : problem with selection

Hello. In my XAML file, I have a ListBox declared like this : <ListBox x:Name="lstDeck" Height="280" ItemsSource="{Binding Path=Deck}" > <ListBox.ItemTemplate> <DataTemplate> <ListBoxItem Content="{Binding}" /> </DataTemplate> <...

Style a WPF Button on right mouse click

Is it possible to add a style trigger in WPF to a Button to determine whether or not the ContextMenu has opened? If so, I'd like to color the background of the corresponding button if the contextmenu is opened. Can't find a regular way to do it... ...

WPF Grouping using CollectionViewSource and DataBinding

I'm binding a CollectionViewSource to a ListView to group items. It all works great except when I update the ObservableCollection the CollectionViewSource is based on. If I update a value of an object in the collection the UI is never updated. Here is an example: <ListView x:Name="MyListView" Margin="0,0,0,65"> <ListView.Gro...

How have you combined the advantages of the direct View-to-Model approach and MVVM in your WPF projects?

In our application we have many Model objects that have hundreds of properties. For every property on the model: public string SubscriptionKind { get; set; } ...100x... we had to make an INotifyPropertyChanged-enabled property on the ViewModel: #region ViewModelProperty: SubscriptionKind private int _subscriptionKind; public int Sub...

Applying a Style to a control that plays an animation based on a databinding to the view model and a control specific field?

So here's the situation, I have a control (code below) that plays an animation from a style datatrigger when a viewmodel property is equal to a value (Binding="{Binding OperatorState}" Value="Blah") Trouble is, although I can bind the BINDING I can't bind the value, as Value appears to have to be a literal. I wanted to do something like...

GMA500 (US15W) problem

Hello, I'm running a WPF test application on Windows XP Embedded with directx9 intalled (and all tests running in dxdiag). The graphics cards is a GMA500 (directx 9.0c) which has capabilities to support rendering tier 2, but I can only get level 1. BTW, I'm using IEGD 10.1 drivers with full video playback acceleration (H.264). Any idea...

States and Behaviors for the WPF developer, where to find informational resources?

I've been doing WPF programming the "old fashioned" way (See charles petzold's applications = code + markup for the age of my extensions), and was recently becoming used to Blend 3, only thing is, there is this whole world I'm missing out on, sketchflow, states, transitions, behaviors, the VSM, all this I seem to be totally missing out o...

Displaying Html Code preview in Wpf

I want to build a sample application where you can preview HTML code for example:: <TabControl......> <tabItem Header="HTML".....> <!- Here I type my HTML code ... <html> <body> <p>********Some Text*******</p> </body> </htm...

Small Problem with WPF XBAP

Sometimes my XBAP application gives this error. Did someone else had this problem? System.InvalidOperationException: No further operations are possible with this instance. This is on https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=496484 Complete stack System.InvalidOperationException: No further ope...

transparent png using wpf in VS2008

Hi, I want make a UI that is semi transparent in WPF VS2008, so I made my form transparent and I want to show a semi transparent png (Which includes "holes") on top of it. How do I show the semi transparent png? Semi transparent, meaning it has holes you can see through. Also how can I get this done in C#, without using WPF. Thanks. ...

How can I swap controls based on a dependency property?

I am creating a custom control. I want the template for this control to use different controls for the root control based on the value of a dependency property called CanExpand. CanExpand is defined in the custom control class. If CanExpand is true, I want to display using an Expander: <ControlTemplate ...> <Expander ...> <!-...

Use UIElement as Clip in WPF

Please pardon my ignorance- I'm very new to WPF. I am looking to implement a minor, visual effect in my application that gives the look of "inner" rounded corners. The window in question has a dark border that encapsulates several UIElements, one of which is a StatusBar, located at the bottom of the window. This StatusBar has a dark bac...

WPF User control binding issue

This should be a very simple case, but I am pulling hair trying to get it to work. Here is the setup: I am designing an app that will have an read-only mode and edit mode for some data. So I created a User Control which is a textbox and textblock bound to the same text data and are conditionally visible based on EditableMode property (s...

WPF - How to access method declared in App.xaml.cs?

How can I access, using C#, a public instance method declared in App.xaml.cs? ...