Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Browsing all 18858 articles
Browse latest View live

Loosely couple a WPF App class property for use in other assemblies

I am building a Wpf MVVM Prism Unity application and want to make a property in the App class available to other modules through some sort of loose coupling methodology. As an example, let's say that...

View Article


Horizontal Listbox and frozen column

I have a horizontal listbox and I want to freeze the first two columns. (in fact it are rows which are shown horizontally)How should i be able to do that?At the moment I use two listboxes but keeping...

View Article


Why is a Wait cursor being displayed and how can it be removed?

In a Wpf application using MVVM, Unity and Prism, the shell is creating a dialog box. The 'parent' is being disabled and the child dialog box is properly displayed but the dialog's cursor is a wait...

View Article

Image may be NSFW.
Clik here to view.

WPF 3D How to make a cube on each side of which is another picture?

Good day!Please help!I did the program that created a cube that can be rotated on the axes. I pulled on this cube texture in the form of a cat. For some reason, the texture appeared on 4 of the 6 sides...

View Article

Error of Layout WPF

I have this SurfaceListBox:<my:SurfaceListBox Margin="10" x:Name="grid1" VirtualizingStackPanel.IsVirtualizing="True" Style="{DynamicResource SurfaceListBoxStyle1}"...

View Article


How Do I access a timer declared in the MainWindow from a UserControl?--WPF...

I am using a timer to plot points in time.  I am trying to clean up my project and create all controls I made in mainWindow.xaml as UserControls.  One control I have is a timer control.  It has some...

View Article

Is this documentation correct regarding AppDomain.UnhandledException Event

http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspxThe link above says this (emphasis mine):If the UnhandledException event is handled in the default application domain, it...

View Article

ValidationEngine for attaching Validation Binding for entire WPF Application

Hi,I want to create a ValidationEngine which would bear following responsibility;1. Bind Validation Rule to entire Control in a WPF Application 2. Explicit calling for any Validation.3. Provide a...

View Article


Why embeded .wav files played with soundplayer on winXP generate strange...

There is a hello.wav that I embeded in my program, and played with below code:Stream WavStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("hello.wav");System.Media.SoundPlayer...

View Article


DataContext not working after clearing Datatable .

I have been trying to use Datatable as DataContext for my XAML UI which has various textbox controls with Binding to various fields of DataTable.My code snippet while intial loading look like...

View Article

WPF Interface Misbehave

Hi All,I have some weird problem going on with my app.I created an interface as follows public interface IConnectable { bool CanConnect { get; } }it works beautifully when i call the following function...

View Article

ObjectDataProvider ObjectInstance bind to static object

 Hi, I'm having a hard time figuring out how to use a static object as the ObjectInstance for an ObjectDataProvider.  Basically, I have a static class User that handles user information (permissions,...

View Article

KeyGesture bound to RoutedUICommand not working with Key.Left but working...

I have just started adding keyboard support for my application. It already had multiple commands implemented but they are all bound to controls, like menu items. Most UI elements in my application are...

View Article


MVVMLight command CanExecute not firing after async call

I'm using MVVMLight in a WPF4 project, and have set up an ApplyCommand and an UndoCommand, which are bound to buttons on the view. All standard stuff, done many times. When the user clicks a button, a...

View Article

Shapes are not getting focus.

Hello, I have a rectangle and ellipse as a child to canvas. When i use MyRectangle.GotFocus, it recieves the focus by pressing the "Tab" botton on keyboard ("Focusable" is set to True) . But when i...

View Article


Window Background using ImageBrush - Fixed size and position

Hi everyone, How can I make a background imagebrush fixed position and size? I tried Strech="None" but image is csntered so when I resize, it moves. Any suggestions?

View Article

How to use DynamicResource to Load an Image Into a UserControl

I am trying to load an image dynamically into a user control in an MVVM, Prism, Unity type environment.  I have not found any examples specific to what I am attempting, and I would be appreciative if...

View Article


Update textbox based on combobox selection in MVVM

Hi,I have a View with combobox and some textboxes, which is responsible to add new Customer record.  When the View is displayed, the combobox displays of existing customers.  If user selects one from...

View Article

ComboBox drop down menu doesn't disapper immediately after selection changed

Hi, in Visual C# 2010 Express, WPF project, I have a ComboBox item that is populated with initial data (no binding involved).To change the selected combobox item, I first pull down the combobox drop...

View Article

c# wpf application on 2 screens in 1 window

Hey everybody,I'd like to run a WPF application with c# on 2 screens. I already found some articles with solutions, but they all create a second window.My question is: Is it possible to have only one...

View Article
Browsing all 18858 articles
Browse latest View live