wpf

Composite Application Block Region injection slow

Im building a wpf app with the composite application block ("prism") V2, and Im having an issue where a user control that is injected by a module is very slow in rendering. The user control contains a datagrid with some 2000 rows in it and there is considerable lag in the control rendering to the screen. Initially I thought the slowness ...

Convert System.Windows.Media.ImageSource to System.Drawing.Bitmap

Title says it all. How can I convert a System.Windows.Media.ImageSource to System.Drawing.Bitmap? ...

Image viewer performance issues in WPF

Hi all. I'm having issues with a image displayer in WPF. I've a ListView displaying ImageSources. <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </Setter.Value> </Setter> ...

XAML StringFormat to format a Double value

I want to format my slider value to be 00:00 format. The below code worked for me, but what I wanted is 00:00 format. I am looking for a total XAML solution. I know that I can write a converter for this easily but wonder if there are any StringFormat way to make it. Text="{Binding Value, ElementName=slider,StringFormat=\{0:00.00\}}" ...

comparision of WPF with WINFORM control

we have "layoutstyle" property in Winform to change the layoutstyle to horrizontal/vertical(all heading and Submenus), what is to be used in WPF to get the same result. ...

displaying subtitles for a video in a WPF MediaElement

I'm working on a WPF application that displays video clips as part of the workflow. I'm doing this by using MediaElement to play locally hosted (not streamed) AVI files. Works great. However, I was just handed a new requirement to allow the display of subtitles while the clip is playing. I have no idea of the best way to go about thi...

WPF Popup Button Question

Hi, In WPF I want to have a button that when clicked, it either opens or closes a Popup depending on whether or not it's already open (Close it if it's open, Open it if it's closed), and I want to do this purely in XAML. Is this possible? Thanks, Roy ...

WPF animation of multiple 3D objects doing multiple transforms each

I'm working on a WPF 3D project where I can have multiple (1 - 20'ish) ModelVisual3D objects being moved around the scene via animation. Each ModelVisual3D has both a RotateTransform3D and a TranslateTransform3D applied to it each move. And each ModelVisual3D object moves independently of each other. So right now in order to do this, ...

How can I get the shortcuts of a given WPF command?

Given a WPF Button with a Command, how can I get the assigned shortcut (ex Copy -> Ctrl + C) ...

wpf threading, backgroundworker, dispatcher

I am new to wpf threading, now that we have backgroundworker and dispatcher classes, classic winforms threading issues are no longer a problem? ...

Cost of using dependency properties

Say I have a control that inherits from UserControl (hence one of its super classes is DependencyObject). It's very easy to solve a notification problem using a DependencyProperty, since INotifyPropertyChanged needs a little implementation, and the other option would be creating a method to modify the state of the control (like myControl...

WPF Repetition Question (MVVM)

Currently my model has ten properties which for our purposes here I'll call AnnualizedRate1, AnnualizedRate2, ..., AnnualizedRate10 which are revealed to views in the view model via ten properties Rate1, Rate2, ..., Rate10. One of my views shows these values in a DataGrid. This is awfully repetitious and a pain to adapt to changing requi...

Application-level Resources in a Different Assembly

This question involves the Visual Studio (2008) WPF Designer's apparent inability to handle the usage of resources located at the App.xaml level if the App.xaml is in a separate assembly from the view. To simplify the explanation of the problem I have created a test application. This application has two assemblies: View and Start. The ...

submenu items in WPF Menu

how to make SUBMENU ites visible vertical as a left navigation in CODEGURU.COM In windows we use layoutstyle property to make all main and child items to be viewed vertical and DOCK the menustrip to left. How to acheive this in WPF ...

Suggestions for building Silverlight and WPF applications with common code.

I'm building a set of assemblies that need to work on both Silverlight and WPF. Up till now, I've been using log4net to handle logging. It's not compatible with Silverlight though, so now I'm facing the prospect of ripping it out, which I don't want to do. My question is this. Assuming I recreate the assemblies as Silverlight assem...

In a wpf TextBox can i make characters in a string that exceed a a certain length turn red?

Im using a TextBox control and want the characters to turn red after a certain number of characters to show users they have typed too much. I dont want to truncate as the user might have typed that "really important thought" and if i truncated they would lose it. I have validation on my underlying business model which tells me when the i...

WPF Menu --equivalent property

How to acheive Layoutsyle = VerticalStackWithOverflow Property in WPF for Menu control. Want File/edit on left corner along with OPEN,new in file to open on rightside of File . sample in Codeguru.com ...

How can I make a template column of WPF Toolkit's DataGrid sortable?

Hi! My application uses the DataGrid of WPF Toolkit. Standard column headers are clickable (when I move over them with the mouse, also some effect appears), but the headers of template columns don't have this behaviour. The sorting event is not fired when I'm clicking on the header and there is also no visual effect. <Controls:DataGrid...

List of WPF functionalities that aren't in Silverlight 3

A common technical decision nowadays is whether to build a ClickOnce rich client application or a web application. Here I'm focussing primarily on choosing between a WPF application or a Silverlight application. The chief benefit of Silverlight is obvious - it can be hosted in a browser. But, if a programmer used to WPF was to star...

How to turn off webbrowser Information Bar?

Hi I am using WPF C# WebBrowser control to navigate a local html file which contains js and css file links, so when my application navigates that local file I get an unwanted security warning information bar, can anyone suggest how to turn it off using C#? I know that I can turn it off in IE settings,and can use frame, but I don't want t...