wpf

Parameterize ValidationRule in WPF

I've only scraped the surface of validation in WPF and have come across a scenario that is likely fairly common: I have a TextBox whose value needs to be validated against a variable data type, depending on the context. For example, if the context's data type is 'int,' then the TextBox needs to accept only input that can be converted to ...

Binding to a string value that should then bind to a Resource, what wrong here ?

Hi, I have a class with the following properties: Message(string), Added(DateTime) and LogLevel(string) In my App.xaml i have the following: <Application.Resources> <ImageSource x:Key="Critical">Gfx/Log/Critical.png</ImageSource> <ImageSource x:Key="Info">Gfx/Log/Information.png</ImageSource> <ImageSource x:Key="Error">Gfx...

How can I programatically create a WPF Toolkit DataGridTemplateColumn?

I was able to recreate this XAML DataGridTextColumn: <tk:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name"/> in code like this: DataGridTextColumn dgtc = new DataGridTextColumn(); dgtc.Header = propertyLabel; dgtc.Binding = new Binding(propertyName); theDataGrid.Columns.Add(dgtc); But how do I recreate th...

Writing a C# desktop application that needs to embed an encrypted database. What type of database should I use?

Hey SO'ers, I'm making a C#/WPF app that needs to access a number of tables to generate some of the xaml code I will use in the app. The tables will also contain some floating point numerical data as well. The program is single-user, so the rdbms doesn't have to be very fancy, but the file does need to be encrypted as it will be "shrin...

WPF DataGrid CellEditingTemplate with floating control

Hello, I'm using the WPF DataGrid and want to make my own CellEditingTemplate. I want to replicate something like the DatePicker that doesn't replace the whole contents of the cell when its being edited, but instead just floats Like this: http://i3.windowsclient.net/SiteFiles/1000/wpfsp1/wpf-35sp1-toolkit/107-2.png?cdn_id={b4d0570c} I t...

Can a WPF window inherit property values from its owner window?

I'd like the child windows in my application to inherit WPF dependency properties from their parent window. If I set TextOptions.TextRenderingMode="ClearType" on my main window (I'm using WPF 4), that value will apply to all child controls of the window. How can I make those values also apply to all child windows? (Window instances with...

Debugging WPF browser applications gives a download file.

Hi, I have built an application for my college work in WPF browser, but when I try to debug, Firefox opens and gives me a download of the xbap file, which should run in the browser. This happens in VS2008 Express and VS2010 beta. I have tried in Internet Explorer and Chrome with the same result. .NET is framework is installed right upto...

What does WPF still have to offer over Silverlight 4?

Given the list of new features announced in Silverlight 4, when is WPF still required? ...

Why is WPF loosing terrain with Silverlight 4 coming?

Possible Duplicates: What does WPF still have to offer over Silverlight 4? Why change from WPF to Silverlight 4 I'm working on a WPF application. We considered using Silverlight instead of WPF, but decided we want a full blown desktop application with the whole unique desktop application feeling and advantages that gives. Howe...

Why change from WPF to Silverlight 4?

I'm working on an application we made WPF instead of Silverlight as we wanted a full blown desktop application with the whole unique feeling and advantages that gives. However, with the announcement of Silverlight 4 I hear there is a buzz about Silverlight mostly being the preferred choice also for desktop applications. So; why should ...

How to Find Children of a UserControl instead of a Window - replacing Window.FindName

I currently have a WPF project which has one main Window, and many UserControls which are children of this Window. Many of the children of this window are Tabs. I have successfully replaced my main Window with a User Control that implements almost exactly the same functionality as the Main Window. Replacing the Window with a UserContro...

Windows 7 Taskbar progress

Quick question, I've developed a Forum specific C# WPF WebBrowser, for Windows 7. I have completed so far for the Taskbar: Tabbed thumbnails Jumplists Icon Overlay Now as the WebBrowser uses the IE engine when a download is started the progress dialog is displayed, what i want is for the progress to be reflected in the Taskbar Butto...

WPF binding behavior

I have page like this ... <Page x:Class="WPFTestRig.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Page1"> <Grid> <StackPanel> <ComboBox Name="myBox" ItemsSource="{Binding Path=MyCollection}" DisplayMemberPath="Name" IsSynchronizedWithCur...

WPF control in windows forms?

I would like to create some custom UI controls that work with both WPF and Windows Forms. Is this possible? If so, can I create these controls in WPF or do I need ot use a Windows Forms control? Are there any other considerations? ...

Where is Button.DialogResult in WPF?

In System.Windows.Forms.Button there is a property DialogResult, where is this property in the System.Windows.Controls.Button (WPF)? ...

Adding and changing usercontrol at run time in a WPF application

I have a situation as follows, i am going to use WPF for first time, so any suggestion abt how to proceed whould be great: I hav a drop down, when i select any item from it - it should change the structure of controls in same window. New controls contain - two menu items and a text box and a list box. Selecting one menuitem will display ...

Update Google Doc from local file using google API possible ? (.NET / C# / WPF)

Hi, I am currently testing the google API. It seems promising, but I am stuck at a "simple" problem. I want to update an existing document with a local copy. My idea was, download all google documents to a folder, using the doc-download. That works. At the next run, I check the dates, if a remote document is newer, grab it again. If th...

How to force a particular .resx file to be used in a WPF DLL?

I have a WPF DLL being called from an unmanaged DLL. The WPF DLL has a dialog that has been translated (two sets of .resx files). If I call the WPF DLL from a WinForm shell, or another WPF shell, I can force the dialog to a particular language (.resx file) by setting the Culture of the current thread. However, when calling the WPF DLL ...

WPF: How to highlight all the cells of a DataGrid meeting a condition?

The (wpftoolkit) datagrid generally represents a collection of objects with rows representing each object, and the columns the repective properties. I am not using it this way. I am using it to represent the "intersection" between 2 collections. Rows represent objects of collection A and columns represent objects in collections B. A ce...

WPF: How to limit number of rows shown by ListBox?

Is it possible to limit the number of rows a listbox show? Eg. let´s say I have a ItemSource with 100 items, but I only want my listbox to be 10 items high. ...