wpf

WPF popup capturing mouse doubleclick events

In my main application window, there are controls, each of which opens a popup that presents more controls to the user. Other controls in the main application window have mousedoubleclick event handlers. My problem is that when the a user double clicks in the popup, the controls behind the popup are receiving the mousedoubleclick event...

How do I get all controls inside a specific RowDefinition/ColumnDefinition in a Grid?

I need to get all controls inside a specific RowDefinition/ColumnDefinition without iterating through all controls in a container. Any tip? Thanks. ...

WPF Converter problem

So I have an object that implements INotifyPropertyChanged, and I have a property that when it changes, it call the PropertyChanged event all right, but when I use a converter like this: <Image Grid.Column="0"> <Image.Source> <Binding Path="IsInstrumentStatusOk" UpdateSourceTrigger="PropertyChanged"> <Bindin...

How to create WPF Application Preloader (like one on this Word 2010)?

How to create WPF Application Preloader (like one on this Word 2010 Prt Scrn)? Drag able and Close able=) ...

How to add a Blend Behavior in a Style Setter

I have crated a Blend behavior for Button. How can I set that to all of my Buttons in the app. <Button ...> <i:Interaction.Behaviors> <local:MyBehavior /> </i:Interaction.Behaviors> </Button> ...

Edit WPF Toolkit to get the DatePicker only.

I am doing a small application and i need a DatePicker control, So i use the WPF toolkit datepicker. After completing my application I notice that my application exe has of size 250k and the WPFToolkit dll has a size 442k. So i am extracting the datepicker control from the toolkit by deleting the other controls from it. But it is not wor...

Is it possible to run a stand-alone WPF application (non XBAP) in Partial Trust?

I thought if I do not use anything beyond simple graphic in a window, I would be able to run a stand-alone WPF application in Partial Trust (at least on Intranet). But unfortunately, even simplest Hello World application fails to load the main window and crashes if run with partial trust. Anybody can shed some light on why this happens...

CPU performance control WPF

I need a control in silverlight that shows a CPU performance in real time just like the windows task manager does. Something like: ...

WPF: TextBox Text is not updating.

I have a user control that i am using inside a Data Template, this user control contains a TextBox which is binded with Value property(declared as a Dependency Property) of my user control. In data template i bind this Value property with my actual property say Name(also a Dependency Property). It works properly, i assign a value to Name...

getting a reference to a MediaElement inside an ItemsControl (WPF)

Hi , this is a known issue with ItemsControl although I couldn't find a solution :( . XAML <ItemsControl x:Name="myItemsControl" ItemsSource ="{Binding videos}" Grid.ColumnSpan="2"> <ItemsControl.Resources> <DataTemplate x:Name="myDataTemplate" DataType="{x:Type sys:String}"> <Grid x:Name="sp" ...

Stop navigation to current control on validation error. How?

I have a problem with my WPF application. I have a datagrid (Wpf Toolkit), I have to manage a Row validation...if validation result is false I would that the other row isn't selectable. Therefore I have to block the selection to current row that I edit. How can I do? Any ideas? ...

How do you hide a WPF DocumentViewer's menu bars?

At the moment I have a DocumentViewer in a WPF window that displays an XPS file. I have created my own "Next Page" and "Previous Page" buttons and have set the DocumentViewer.Background property to be completely transparent. All that is left of the DocumentViewer's own controls is the menu bar at the top (displaying zoom settings, print...

How to pass an empty string as a ConverterPararmeter?

Hello I have a Binding that I am using along with a converter, I want the parameter that is transferred to the converter should be an empty string. Is there a way I can pass it via an inline binding? ...

Load Dicom image and display it - using ClearCanvas library

This is a very narrow and specific question, but I know there are someone else out there using this, so I'll keep my fingers crossed and hope anyone of you pics this question up. I'm working on a WPF application where one part of it is a Dicom viewer. We'd like to use a 3rd party component to handle the Dicom stuff, and ClearCanvas is ...

Toolkit for making Windows Taskbar Tool Application?

Hi, I'm making a small tool application that user can minimize in the taskbar. I'm sure I've seen a toolkit for it in some blog a few years ago. I'm basically just looking for a project template that perhaps has ready-made functionality for: minimizing to taskbar right-click menus animated small notification pop-up windows (like MS Me...

ContentPresenter not showing Usercontrol, how come?

Hello; I have a listbox that displays a number of usercontrols that are bound to my questions. this is working fine, however i don't want each of the items in the listbox to be selectable, as such i created a blank style and applied it to the ItemContainerStyle. This has resulted in my content to disappear and each item is showing blank....

Playing mp3 in WPF

MediaElement doesnt work for me in my WPF application. mediaElement1.LoadedBehavior = MediaState.Manual; mediaElement1.Source = new Uri(@"C:\Music\MySong.mp3", UriKind.RelativeOrAbsolute); mediaElement1.Play(); When I do this in my Window1.xaml.cs file. Nothing happens. Atleast I cant hear anything. I have tried all kind of different ...

WPF MVVM Property Change Animation

I am looking for a clean way to start an animation that will have dynamic values. Basically I want to do an animation where an element changes width based on the data of another element. Say I have a TextBlock that's Text Property is Binding. When this property changes I want a visual element say a Rectangle for our sake to do a Doubl...

XAML ScrollViewer scroll bar hidden issue (Silverlight)

I’ve got this strange problem whereby the content within a scroll viewer increases in size, the scroll viewer then shows is horizontal scroll bar. However the grid the ScrollViewer is ultimately within doesn’t seem to resize enough to show the scroll bar. I’ve isolated the problem in this sample app, basically some xaml and some code be...

Binding to a collection of shapes?

How would I bind to a collection of shapes? I'd like to build a small application (just for learning purposes) where I utilize MVVM for drawing shapes. The DataContext of the MainWindow is the MainWindowViewModel That MainWindowViewModel has an ObservableCollection of shapes. I have currently only a Canvas on my MainWindow with it...