wpf

Show first frame of video in WPF MediaElement

I have a WPF-application with a MediaElement which I use to run a video. I don't want the video to autoplay when loaded, so I set the LoadedBehavior to Manual. <MediaElement LoadedBehavior="Manual" Source="foo.wmv" MediaOpened="videoElement_MediaOpened" /> However; I want the element to show the first fr...

Updating one dependency property from another

I have a string dependency property (SearchText), when updated, needs to update a collection dependency property (Results). My collection dp: public IEnumerable<string> Results{ get { return (IEnumerable<string>) GetValue(ResultsProperty); } set { SetValue(ResultsProperty, value); } } public static readonly DependencyProperty Result...

Are there any fluent WPF projects?

As part of my on-going attempt to come to terms with WPF/XAML, I've become interested in the application of fluent interfaces to UI coding. I am aware of Fluent Silverlight (http://code.google.com/p/fluent-silverlight/), but I can't seem to find anything equivalent for WPF. Just as a personal note, I'm finding it very difficult to buy ...

How to run WPF XBAP app on my intranet?

I have a Debian server with a standart Apache and a MySQL. I will host there my xbap app. I want to create a application that access that MySQL and can be seen in my intranet in firefox. It's possible? How? And about the trust not granted message? Suggestions will be great. Thankz! ...

WPF ListView : Bind column Width of two ListView to each other ?

In my WPF application I have two ListView with identical columns. I want to bind the column width of the ListViews to each other. When I resize a column in one ListView I want the matching column in the other ListView to have the same width. It would be great if there would be no "Master"-ListView. Each ListView should update the other ...

Call a method in a WPF app from Flash swf or exe

I'm working on a WPF app that needs to host some Flash content. The plan is create an exe from the Flash content, then invoke the exe from the WPF app (the option of hosting swf content inside a WebBrowser control was discussed but deemed to be too slow for this application). Is it possible for the Flash application to call a method in...

sorting a bound ItemsControl in a DataTemplate (XAML only)

Is there a XAML only way to automatically sort the bound items (list of ViewModel object) ItemsControl based on one of the properties of the items. The ItemsControl is part of a DataTemplate. I thought CollectionViewSource would do the trick, but how do I bind the CollectionViewSource to the ItemsControl. The follwoing code dispays nothi...

WPF Toolkit Calendar Control - how to prevent next month scrolling?

When the calendar control provided in the WPF toolkit (and included in .Net 4) is displayed in "month view", it displays days from the previous and the next month, filling up the entire calendar. When you click on a day of the previous or next month, it will scroll a month backwards or forwards automatically. This behavior is throwing my...

WPF TabControl and DataTemplates

I've got a set of ViewModels that I'm binding to the ItemsSource property of a TabControl. Let's call those ViewModels AViewModel, BViewModel, and CViewModel. Each one of those needs to have a different ItemTemplate (for the header; because they each need to show a different icon) and a different ContentTemplate (because they have very d...

A concise way to define properties for MVVM data binding in C# WPF

Is there a concise way to define properties in a ViewModel for data binding in C# WPF? The following property definition is very verbose, especially when there are lots of properties: private bool mSomeProperty; public bool SomeProperty { get { return this.mSomeProperty; } set { if (value != this.mSomeProperty) ...

Dependency property in app.xaml.cs

Hello, I am new to WPF and the below question may look silly for many, please pardon me. How can I create a dependency property in app.xaml.cs? Actually, I tried to created it. The below code, public static DependencyProperty TempProperty = DependencyProperty.Register("Temp", typeof(string), typeof(App)); public strin...

Binding RadioButton IsChecked to ListBoxItem IsSelected and ListBox IsFocused

Iv seen other questions very similar to this but somehow I still cant get it working. here is the scenario. What I have I have a ListBox that displays a list of my view models. Each view model has a list of children that are displayed in another, nested list box. I am using a DataTemplate to achieve this. What I Want I want the childr...

VS2010's WPF renders poorly inside a Windows7 VM?

Kevin Hoffman this morning reports that: When put under a virtual machine running Windows 7, VS2010 fails to render things, borders disappear, windows become unusable and the experience is downright awful. On the other hand, when you run VS2010 "bare metal" with no virtualization between it and your video card, everythi...

Is it possible to create a Style for a 2x2 Grid in WPF?

I'm trying to do something like this... <Style x:Key="TwoByTwoGridStyle" TargetType="Grid"> <Setter Property="Grid.RowDefinitions"> <Setter.Value> <ControlTemplate> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> ...

Visual Studio Designer broken using Expression Blend SDK Behavior

I'm running into a problem with the new Expression Blend behaviors. I have a customized Behavior<T> class developed using the Expression Blend 3 SDK. The behavior works properly, and the solution compiles. That is perfect. I have all of my references (System.Windows.Interactivity.dll + Microsoft.Expression.Interactions.dll) setup in ...

Passing two command parameters using a WPF binding.

I have a command which I am executing from my XAML file using the following standard syntax: <Button Content="Zoom" Command="{Binding MyViewModel.ZoomCommand}"/> This worked fine until I realized that I needed TWO pieces of information from the view in order to make this operation complete the way users expect (the width and height of...

WPF Animated Background Control?

In my WPF application, i want to have an ambient animated background similar to Media Center's background. Does anyone know of a free control that offers this? ...

WPF: How to show output of a database?

I have a database consisting of 4 or 5 columns, and i want to provide a simple display for that. What WPF control would be best suited to showing the data? ...

How does the Compiler generate the Event handler code?

I have added an event to a user control, and I call the event in the consumer window of the user control, My question is: what code does the compiler generate when we assign an event handler through the IDE? So that I can also use something similar to write the event handler at runtime automatically. I know we can write an event handl...

How do I load a page in a Frame in WPF window when i click on a hyperlink

I have a problem when I click on a hyperlink. Page1 should load in frame1 in a WPF window. ...