wpf

How to manually reload the Visual Studio designer for WPF

Is there any way to force the WPF designer to reload or refresh, without rebuilding the entire project or solution? If there's an error, I get an option in the designer view to refresh the designer. But if I don't have an error, how can I get the designer to refresh after I've made a change? ...

Information on migrating from Client/Server to ASP.net web parts

I have had the question posed at my work that, since we are planning to eventually move to Sharepoint 2010 for most of our Development, and since Sharepoint 2010 supports asp.net web parts, should we start moving all of our new development to be exclusively asp.net web parts? It was also asked how prism factors into all of this. So my ...

TopMost is not TopMost always - WPF

I have a clock application. I have set the Window's TopMost property. But, randomly, some other window or visual studio comes above clock. Is there any other way to make my window (clock app) to display always on top of all other applications. ...

Silverlight strange bug with bitmap images and WebClient

I have strange bug with showing image in silverlight. The problem to show list of images that configured in xml file and this xml downloaded from server by WebClient type. WebClient client = new WebClient(); client.AllowReadStreamBuffering = true; client.OpenReadAsync(new Uri(path, UriKind.Relative), new GalleryU...

Raising RoutedEvents in non-UIElement class

It seems that the entire power of routedevents is directed towards UI development. Meaning to ask, would it be possible to raise a routed event from a class that does not extend a UIElement or UserControl class at all? For example: I create a State class that I that performs several changes on some data (mainly drawings and objects) and ...

What are the standard ways to put a crisp partial border around a WPF element?

If I have a menu bar in WPF and I set its Border to be black and have thickness 1, I get a crsip 1 pixel border all the way around the menu bar, instead of just a nice crisp line at the bottom. Similarly for a status bar. How can I get a nice crisp boundary around just part of a WPF element like a menu bar or status bar? Having crisp 1 ...

How to save data from a DetailView bound to a ViewModel if the repository is a no-go in a viewmodel ?

Hello, we mvvm lovers all know Josh Smith mvvm sample and how he has saved the customer in the detail customer view by injecting the repository object into the customerViewModel`s constructor. But a viewmodel should not know about repositories. Its just a model of a view nothing must being aware of persistence etc... How can I registe...

Why are absolute uri's required for merged dictionaries in Generic.xaml?

Consider a File | New Project of a WPF Application that contains: A new custom control named CustomControl1 Two new resource dictionaries named Dictionary1 and Dictionary2 Take the generated style out of Generic.xaml and move it to Dictionary2. Then merge Dictionary2 into Dictionary1 and Dictionary1 into Generic like this: <!--Gener...

DataGrid Excessive Databinding Property Get Calls

We have a data grid on a window that is bound to a collection of objects. We are having very bad performance on this window; it can take up to 20 seconds to load, and then 5-7 seconds each time you 'scroll' the data grid. This is with a total of 12 items so far. When we investigated, it seemed that the primary cause of the slowdown w...

WPF ListBox that can sort by column

I have a XAML file with only a ListBox. I dynamically create the columns and add the rows. with this code: ListBoxItem l1 = new ListBoxItem(); StackPanel s1 = new StackPanel(); s1.Orientation = Orientation.Horizontal; ContentPresenter ch1 = new ContentPresenter(); ch1.Content = "ICR"; s1.Children.Add(ch1); //just an example I add mor...

how to consume wf4 service from wpf

I'm not sure if I really understood what workflow foundation is. I recently started working on it and I was really amazed to be able to code using flowcharts. My requirement is to send xml request to wf4 service using pretty much any kind of soapclient. It could be xmlhttp or from a wpf application. Currently I added a xbap project and...

How do I clear the values inserted on save command in MVVM WPF

Hi, I am able to save the data to database using the save command. But the entered data is not cleared after successfully save operation. How do I clear the values in ViewModel itself. Thanks ...

Expression Blend 4 accidently deleted App.xaml

Hey guys. Im new to Expression and by accident I deleted the App.xaml file. I think this is an important file and I cannot workout how to create an equivalent. Please help, Andy ...

Silverlight Application Hosting Requirements

Hi there, I want to build a silverlight web application that could installed on a user's computer. So any hosting requirements would be subject to whatever configuration the user has. What are there requirements to host a silverlight application? I need the same question answered for Flash and WPF. Can any OS be used? Is it required...

How do you open a WPF window in its own thread, then close it?

I am trying to give some user entertainment, and show a "please wait" window, with Marquee, during the loading of a separate complex Window. I am attempting to do this by loading the Window in a new thread, like this: Public Function ShowPleaseWait() As System.Threading.Thread Dim PleaseWait As New System.Threading.Thread(...

how to call wpf user control from winfrom

I have a winform 'form1' and a wpf usercontrol 'wpfuser1' i set 'wpf user1' as a splash screen with progress bar in form1 i would like to call that splash screen to indicate the form is loading. how can i do that in form1? public Form1() { this.Hide(); UserControl1 wpfuser1 = new UserControl1(); ...

ObservableCollection

Hi all, I have a WPF dialog that is bound to a list of ObservableCollection<MyEntity> type. In the dialog, I want the "OK" button to be enabled only if changes are made to the ObservableCollection<MyEntity> list - that includes adding/removing items from the list and modifying the individual items in the list. For adding/removing items...

Is Grid.RowSpan ignored when measuring heights of rows? (WPF)

Here is a 2x2 grid, in which the first column spans both rows, but its fixed-height content seems to be dictating the minimum height for the first row: <UserControl x:Class="Test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300"> <Grid> <Grid...

Silverlight ListBox with ObservableCollection<T> and dynamic filter

Lets say I have this class: public class MyData { public bool IsActive{get;set;} public String Data1 {get;set;} public String Data2 {get;set;} } and an ObservableCollection<MyData> data = new ObservableCollection<MyData>; ListBox.ItemsSource = data; Adding items to the ObservableCollectionworks as expected; however, I w...

ContentControl does not show change

Hi, The following code is in a MEF MVVM desktop application. The Shell is already build, but a Module is initialising. The Module wants to add text to a ContentControl in the Shell, but the following code does not cause the change to be seen in the Shell Window. Any suggestions as to how I get the window to update. thanks [Importin...