wpf

How to port BrowseForFolder from VBScript to C#/WPF?

I need some kind of dialog for browsing the local SMB network for file shares. VBScript does it like this. Set application = CreateObject("Shell.Application") Set folder = application.BrowseForFolder(0, "Moo!", &h250, &h12) ' &h12 sets ' Network as the root folder. So I added a reference to Forms and tried to do it with FolderBrowserD...

Dotted border on ListBoxItem in WPF

Hi How can I make the default border on my ListBoxItems a dotted border? See following way of styling it: <Grid.Resources> <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="Height" Value="30" /> <Setter Property="BorderThickness" Value="0,0,0,1" /> <Setter Property="BorderBrush"...

Hosting Flash movie in a WPF project

I want to host a SWF (Flash animation) in a WPF project. I searched Google and found something. I tried that technique but had some troubles. In this article, it says: **Then, as mentioned in this posting, it is necessary to run AxImp.exe from the .net sdk on the Flash ocx to generate following files. 1. AxShockwaveFlashOb...

How do I get the data shown in an Xceed grid and export to XML?

I have an Xceed datagrid v2(express) bound to a list of viewmodels. Each viewmodel consists of several types of objects. For example a viewmodel with a specific contact and its employer object. In the grid I show the contact information and some employer information. What I want to do is get the information shown in the grid instead of...

Linq to SQL Compact - Update binding

When I set the ItemsSource of a ListBox to the contents of a table, like this: this.listBox.ItemsSource = db.Table; The items are not updated automatically in the ListBox. How can I manage to update the ListBox automatically when items are added, removed or changed? And can I also receive an event when the collection has changed? ...

WPF and MVVM: Changing data binding converter at runtime

I am using WPF and the MVVM pattern in my user interface. In my ViewModel I have a List containing distances in millimetres, which I display in a ListView by binding ListView.ItemsSource to the List. However, I would like the values displayed to use a more natural unit - either metres or feet depending on the state of a "metric" checkbox...

Why does Visual Studio 2010 have rendering problems in VMware?

We were testing our WPF application on Windows XP in the VMware Player (with VMware Tools) and noticed that dropdowns were buggy in that all the choices would appear when you clicked on the ComboBox but as you moused over them they would disappear. We then noticed that Visual Studio Express 2010 has the exact same problem with its menus...

How do I detect row selection in the Xceed DataGrid for WPF

I'm horrible at this WPF thing, so bear with me. I'm using the Xceed DataGrid for WPF, and I need to know when someone selects a row, but I can't figure out how to do it. I'm sure I need to add some XAML to enable this, but I can't figure out what I should do. ...

Distinguish between mouse doubleclick and mouse click in wpf

In my WPF application , I am using ListView GridView, and I implemented a functionality that is associated to mouse double click. Is there a way, or a control that distinguish between the mouse double click and mouse click? I used a button, and implemented an event for mousedoubleclick, but the click event is still triggering Thanks fo...

WPF application window appears on top of SplashScreen

I followed the simple steps outlined at How to: Add a Splash Screen to a WPF Application to add a splash screen to my WPF application. When I start the application, the splash image is shown, then the main window pops up, and the splash image fades away. My problem is that when the main window pops up, it appears on top of the splash im...

XmlDataProvider Refresh source WPF.

I have a WPF Grid <Window x:Class="LabsRSS.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Poperecinii Timur Lab" Height="404" Width="588"> <Grid x:Name="blah"> <Grid.Resources> <XmlDataProvider x:Key="flickrdata" Source="http://api.flic...

WPF Listview/Gridview setting selected item when combobox is clicked

I'm having issues using a GridView as a ListView's View, what I want to do is fire an event when a user makes a selection from a combobox within the Gridview and pass the selected item within the event. My first issue is that when the user clicks the combobox within a row, the row isnt selected (meaning the selecteditem stays null unle...

wpf mvvm equality

I would like to use an MVVM in a WPF project I'm working on, including the use of RelayCommands (aka DelegateCommands). I'm running into an interesting but frustration problem in implementing equality for my ViewModels, outlined here. I have a base class in my ViewModel hierarchy which examines all properties reflectively as part of its ...

How do I get a ComboBox SelectionChanged event to fire from a nested ListBoxItem?

This is a rather complex problem that has me really confused right now. Any help would be greatly appreciated. The Setup: ListBox of Type A UserControls ->ListBoxItem of Type A UserControl -->ListBox of Type B UserControls --->ListBoxItem of Type B UserControl ---->ListBox of Type C UserControls ----->ListBoxItem of Type C UserCon...

Using LibraryStacks in a ScatterView on Surface

We're trying to figure out how to drag an item from a LibraryStack container onto a ScatterView, like how the photo viewer sample applications work. Currently, the item just flies back into the LibraryStack after we drag it out. We can drag and drop items into other LibraryStacks or LibraryBars. Here's a sample of what we're trying: <...

Receive WM_COPYDATA struct in WPF or Console C# app

I am writing a C# application that needs to communicate with another application written in native C. So far I have figured out how to send messages from my C# app to the C app with the User32.dll SendMessage. However I am unable to figure out how to get the C# app to RECEIVE messages from the C app. I have seen WinForms examples of ove...

WPF: Dynamic Form aligned by a <Grid>

I'm building a GUI to edit various XML configuration files based on what values are allowed by their schema. I need a way to display a label for each field in a left column, while displaying a control to edit that field on the right column. If this list of fields weren't dynamic, I'd simply display them in a Grid with two columns. But...

Why sorting using CollectionViewSource.SortDescriptions is slow?

This is the default sort method when you click on a column header in a DataGrid. When the underlying list contains 100 000 items, it takes about 20 seconds to refresh the view. Same delay can be observed when setting SortDescriptions on a CollectionView. Sorting by using ListCollectionView.CustomSort or by sorting and re-assinging the l...

WPF DataGrid: DataGridComboxBox ItemsSource Binding to a Collection of Collections

Situation: I've created a DataGrid in XAML and the ItemsSource is binded to an ObservableCollection of a certain class that contains properties. Then in C#, I create a DataGridTextColumn and a DataGridComboBoxColumn and binded these to the properties of the objects inside the ObservableCollection. I can bind the DataGridComboBoxColumn...

How do i enable the firefox xbap plugin

Firefox recently blacklisted the plugin that allows xbaps to work in firefox This is a huge problem for me as one of my companies enterprise products is a web application that makes use of an xbap and must work in firefox. Does anyone know if there is an update to the blacklisted plugin or if it is possible to overwrite the blacklist a...