wpf

raising events passing parameters in wpf

Hi, I'd like to add tabs to my window when an item in the GridView is double-clicked. But the tab that will be added depends on the clicked item. Which way should I do this on WPF? I thought about RoutedEvents, but I don't know how to pass a parameter with it. Any suggestions? ...

What is it about DataTable Column Names with dots that makes them unsuitable for WPF's DataGrid control?

Run this, and be confused: <Window x:Class="Fucking_Data_Grids.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <DataGrid Name="r1" ItemsS...

WPF Browser is there, but invisible.

I am attempting to use the Browser control in a very simple WPF application, and it appears that while the browser is loading the page that I requested (I can mouseover images and see the ALT tags), I can't actually see anything else: Here is the XAML for the app: <Window x:Class="SmokeyBox2.MainWindow" xmlns="http://schemas.m...

WPF TreeView, get TreeViewItem in PreviewMouseDown event

How can I determine TreeViewItem clicked in PreviewMouseDown event? ...

Using WPFPerf to profile a WPF 4.0 application doesn't show me any information

I am trying to use WPFPerf to profile a WPF 4.0 application (I have the latest WPFPerf that should work on WPF 4.0 aps). I start the tool Visual Profiler from WPFPerf, I start my aplication, but after that nothing happens and the element tree from the Visual Profiler is empty. No other error message is shown. Can anyone tell me what am I...

Remove the "blockiness" in Progress Bar in WPF

Hi All, I want to remove the spaces between the blocks showing the progress. I need it to be solid. Code: <ProgressBar Name="probar" Minimum="0" Height="40" BorderThickness="0"/> Geetha ...

Setting TreeView.DataContext doesn't refresh the tree

I have a List that I've bound to a TreeView. Setting TreeView.DataContext works - everything displays correctly. I then change the list (add an item to it) and set TreeView.DataContext again (to the same value) but the tree does not refresh with the new items. How do I get the treeview to refresh? This is basically my code: public clas...

Checking for updates at startup

Let's consider a WPF client-server application. What is the best practice to create the client, so that every time it is launched, it checks for updates and if any available, update the client application? ...

WPF: Refreshing the UserControls after changes

Hi, I'm doing a Microsoft Surface Application and I have this problem: I use the MVVM-pattern. When a user places his ID-Card (with a tag on it) on the surface, this user is set as "current user". When pressing a button the user can edit his adress and other stuff. He is shown a "save"-button and an "exit"-button then. On these buttons...

Cannot create instance of 'Ribbon'

I'm having trouble using the Ribbon control from the Office 2007 RibbonControlsLibrary.dll. It works for most people but not for me. The fault I get is: Cannot create instance of 'Ribbon' defined in assembly 'RibbonControlsLibrary, Version=3.5.31016.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Exception has been thrown by the ...

Setting Frame.Content doesn't always work

I have a Frame control and I'm setting the Content property. If I set it twice, first to one control then to another, it shows the first control instead of the second. If I display a message box after setting it the first time then it works fine (ie it displays the second control). It's like I can only set Content once until the screen ...

Changing TextBlock.Text in trigger didn't work

I have the next code in my view: <Style x:Key="documentFileNameStyle"> <Setter Property="TextBlock.Foreground" Value="Gray"/> <Style.Triggers> <DataTrigger Binding="{Binding Path=Untitled}" Value="True"> <Setter Property="TextBlock.FontStyle" Value="Italic"/> <Setter Property="TextBlock.Text" Valu...

WPF BackGroundWorker ProgressChanged not updating textblock

I have the method below that seems to behaving strangely. The ProgressChanged and RunWorkerCompleted seem to be updating themselves at the same time. If I comment out the RunWorkerCompleted code which updates the Textblock I see the ProgressChanged taking effect after the data is transferred. What am i doing wrong here? I obviously want ...

Wpf datagrid row not updating when binded collection updated?

I have product class named-Products.cs class Products : INotifyPropertyChanged { private int productId = 0; private int quantity = 0; private string description = string.Empty; private decimal price = 0.0m; public event PropertyChangedEventHandler PropertyChanged; public Products() { } private void...

In wpf how to handle a event raised by a button inside user control in the page which uses that user control

Hi I am using MVVM architecture. I had created a user control which contains a button control. I want the click event of the button control to be captured in page which uses this user control. How to do this? Plase help :) ...

ShowDialog on MEF Component Only Works Once

I created a WPF Window and made it a MEF Export. I can do a ShowDialog once on the MEF Import but the second time it aborts because the MEF component was closed by the first ShowDialog. What can be done to allow repeats of ShowDialog? ...

Non-resizeable, bordered WPF Windows with WindowStyle=None

Basically, I need a window to look like the following image: http://screenshots.thex9.net/2010-05-31_2132.png (Is NOT resizeable, yet retains the glass border) I've managed to get it working with Windows Forms, but I need to be using WPF. To get it working in Windows Forms, I used the following code: protected override void WndPro...

No events passed to WPF adorner layer

I am trying to make a nice "drag and drop zone" in WPF that is displayed in the adorner layer when something is being dragged into the main application. The problem is that I do not get any events from my adorner, even though it according to documentation should receive all input events since it is in a higher z-order. To debug my probl...

Question regarding WPF triggers

Hi, I have a problem with WPF triggers. In my application i used a multitrigger but would like to achieve that changes made when a trigger's conditions become true to persist and NOT to be invalidated when the trigger's conditions become false AGAIN. Is it possible to realize what I want ? Thanks in advance. ...

WPF deployment strategy dilemma.clickonce(limited customization)+autoupdate vs installer(unlimited costomization) no autoupdate

Hello Experts!!! I've been facing a deployment problem.I've built a WPF application with visual studio 2008 and created an installer(msi) which works fine.But then it's pain to add automatic update to it. i've seen this article at windowsclient.net but it seems to be pretty old but could have been the perfect thing for me.Then i looke...