wpf

Is Embed Resource a good approach for a read only xml database?

I have an open source application (here) This application get a character or a sentence and give some unicode information about it. Iuse Unicode Character Database which provided by Unicode.org this is a XML document (130MB) At first I embed this XML to my DLL but I don't know is it a good approach or no. because DLL size growth just ...

how to bind to the results of a query in WPF

I have a query that hits a service and returns the results back to me as an indexed collection static void QueryActivities() { QueryClient qc = new QueryClient("BasicHttpBinding_IQuery"); QueryFilter filter = new QueryFilter(); filter.CallForService = false; var result = qc.GetFilteredActivityIndex(filter); result.Cl...

WPF 3D Editor which look like 3DSMAX

Hi, Is there any source for a WPF 3D editor (4 viewport : perspective,front,top,left) Thanks ...

Change the content of a button at runtime in wpf

I have a button in a wpf (silverlight actually) application. I want to change the content of this button at runtime in order to add an image to it (for example, if content was "button one", i want the content to become: stackpanel containing image1 + original button text). Please help. ...

Windows Mobile 6.5 modern GUI development

Hello How to approach a modern GUI development in Windows Mobile 6.5. I can see in .NET CF 2.0/3.5 only legacy common controls, no alpha blended controls, no fading etc. Comparing to Android or Symbian, Windows Mobile 6.5 look-a-like of applications is very elderly. Is there support for WPF in Windows Mobile 6.5? Thanks and Regards Do...

Why doesn't keyboard input work for a ScrollViewer when the child control has input focus?

Why doesn't keyboard input work for a ScrollViewer when the child control has input focus? This is the scenario. A WPF window opens. It sets the focus to a control that is embedded in a ScrollViewer. I hit the up and down and left and right keys. The ScrollViewer doesn't seem to handle the key events, anyone know why? This is the s...

Serialize WPF component using XamlWriter without default constructor

Ive found out that you can serialize a wpf component, in my example a FixedDocument, using the XamlWriter and a MemoryStream: FixedDocument doc = GetDocument(); MemoryStream stream = new MemoryStream(); XamlWriter.Save(doc, stream); And then to get it back: stream.Seek(0, SeekOrigin.Begin); FixedDocument result = (FixedDocument)XamlR...

wpf mvvm datagrid selectedrow

Hi, after some google around, I just figured out that there is no one that is using 100% MvvM pattern to get the ToolKit DataGrid events ! Is that impossible or what ? I see too much people using the code-behind... How can I get the SelectedRow or dblClick events using mvvm ? cheers ...

Fill panel with rectangles

I want to fill a panel with rectangles, and when the panel is resized, the rectangles should resize as well. Why doesn't the following work? <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <StackPanel HorizontalAlignment="Stretch" VerticalAlignment...

Can we Fire the button CLick event on Windowload In WPf C#

Hello All i want to FIre the button Click event When My Window is Loaded.. How Can i Achieve it in Wpf. thanks in advance shashank ...

Rx Reactive extensions: Unit testing with FromAsyncPattern

The Reactive Extensions have a sexy little hook to simplify calling async methods: var func = Observable.FromAsyncPattern<InType, OutType>( myWcfService.BeginDoStuff, myWcfService.EndDoStuff); func(inData).ObserveOnDispatcher().Subscribe(x => Foo(x)); I am using this in an WPF project, and it works great at runtime. Unfortunat...

WPF In-Memory Image Display

Im trying to build an Item Template for my list-view and im bound to a list of Entities. The entity I have has a System.Drawing.Image that I'd like to display, but so far I cannot for the life of me figure out how to bind it to the <Image> block. Every example and documentation I can find on the internet pertains to Images accessible vi...

WPF ComboBox MaxDropDownItems

Is there anyway to set the maximum number of drop down items rather than the max drop down height in WPF? Thanks! -Kevin ...

Creating WPF components in background thread

Im working on a reporting system, a series of DocumentPage are to be created through a DocumentPaginator. These documents include a number of WPF components that are to be instantiated so the paginator includes the correct things when later sent to the XpsDocumentWriter (which in turn is sent to the actual printer). My problem now is th...

Sharing state/changes across ViewModels

I have an App which has a Tasks tab and a Projects tab. I decided to make a separate ViewModel for each of the tabs, TasksViewModel and ProjectsViewModel. The Tasks tab has a new task area with an associated project pulldown and the Projects tab (obviously) has a list of projects. What I'd like is for the pulldown on the Tasks tab to s...

Possible to Freeze Columns in a WPF ListView/GridView?

I currently have a GridView inside a ListView.View. The GridView columns will far exceed the width of the screen, so there will always be horizontal scrolling. What I would like to do is to have certain columns always remain on the screen regardless of scrolling. So the first x columns from the left are frozen (ala Excel), and the res...

InputManager ignores cut/copy/paste when initiated from menu

I'm using the InputManager to check if changes to controls are done by user or code. This works fine, except when user uses the context menu for cut/copy/paste. If the user do ctrl+v in a textbox, InputManager correctly notices it. However, if the paste is done from the context menu of the textbox, the InputManager never fires the PreNot...

MVVM-Light: Load UserControl into Window

What is the best practice to load an UserControl into an Window with MVVM-Light? Where create the UserControl instance, in the ViewModel from Window or direct in the window? ...

How would I go about licensing a WPF windows application

I have developed a small application that I would like to try and sell but I am unfamiliar with how best to go about this. How would I go about locking the program down for trial use1. How would I go about dealing with accepting payments? Bearing in mind that I am a one man band with not a lot of money, I was hoping for a solution ...

Why does the BackgroundWorker in WPF need Thread.Sleep to update UI controls?

namespace WpfApplication1 { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { BackgroundWorker bgWorker; Action<int> myProgressReporter; public Window1() { InitializeComponent(); bgWorker = new BackgroundWorker(); bgWorker.DoWork += bgWorke...