wpf

Create a WPF library in Visual Studio Express

I am trying to make my code more reusable by placing commonly recurring utility classes and user controls into a packaged library. The IDE is making this difficult, as so far, I have found that it always defaults to Windows Forms user controls and disabling my ability to create xaml files etc from the 'Add a New Item' dialog. Is it poss...

WPF - How to capture when CTRL+SHIFT are pressed down?

When the user clicks left CTRL+ left SHIFT I want to make the entire application translucent (like VS2008's intellisense drop-down). If I write my code on the KeyUp event I can capture both keys being pressed, but the transparency effect should only be active while the keys are pressed. When they are release the opacity should go back to...

WPF C# WYSIWYG Editor

Hello.. I have created a wysiwyg editor as a standard C# program using the windows form control. I would like to do the same thing except with WPF. In my old application I did something like this. using mshtml; private IHTMLDocument2 doc; ... HTMLeditor.DocumentText = "<html><body></body></html>"; doc = HTMLeditor.Document.DomDocu...

Enable a button when a textbox got text

What is the simplest way in WPF to enable a button when the user types something in a textbox? Thanks! ...

WPF - DataTemplate/Value Converter for hyperlink in TextBlock

I have a ListBox showing a list of people's names, emails, departments, etc. There is a DataTemplate that has a few TextBlocks to display each property. One of these TextBlocks is wrapping a Hyperlink to show email addresses like so: <TextBlock> <Hyperlink NavigateUri="{Binding Email}"> <TextBlock Text="{Binding Email}" /> <...

Double Click a list item

Hello, I have a listbox in my wpf window that binds to an observable collection, now I want to open the browser if someone clicks on an element of the listbox (just like a link). Can someone tell me how to do this? I found something with listboxviews, does it only work this way or is there a way by just using the lisbox? Yours Sebast...

How can I selectively validate a form in WPF?

I'm currently using the validation code listed here in an application. I'd like to selectively validate a page. What I mean by that is this: I have a form that's databound with validation rules attached. I also have a checkbox that, when checked, disables and clears the values of several bound textboxes. Is there a property I can set on ...

How to Bind a WPF control to a WCF method using an ObjectDataProvider

I'm testing out WPF for the first time and I'm trying to call a WCF service with an ObjectDataProvider. WCF Service named WcfService1 with a single method: namespace WcfService1 { public class Service1 : IService1 { public String HelloWorld() { return "Hello World!"; } } } I added a S...

WPF iGoogle dock style library

I'm looking for a docking library or resources that discuss building an iGoogle style dock layout. I've played with a few third party controls today that were mentioned in this post(http://stackoverflow.com/questions/344205/recommendations-on-a-wpf-docking-library), but it doesn't fit the layout style I'm looking for. Imagine a portal i...

Prevent Window Focus Change

I'm trying to help a disabled person with a small bit of code to help him play a game easier. He is limited to a trackball and a single button. Currently he uses the onscreen keyboard and has managed to play other games using it. I've created a small bit of code to try and make his live easier. It uses hover buttons for the keys. When t...

how to change or modify Preview image on the Vista taskbar?

We have a window like this: WPF main window (with glass border) -> Child window - frame control -> Page when user minimize the main window, and to view the preview image on Vista taskbar, the preview image will display main window only, the child window (with page) will missing. so, my question is hot to fix this issue? chang...

Hide the column of wpf listview

how to make column invisible of wpf listview? (one way is to set width property to minimum lenth but that not proper solution) can anyone help me? ...

Can I handle thrown exceptions in XAML?

In my XAML I get all customers by binding to a GetAll property: <ListBox ItemsSource="{Binding GetAll}" ItemTemplate="{StaticResource allCustomersDataTemplate}" Style="{StaticResource allCustomersListBox}"> </ListBox> The GetAll property is an observable collection in my view model, which calls the Model to get all collecti...

Custom DependancyProperty

Hi, I want to create a DependancyProperty with 2 options (Left and Right) similar to properties like LeftAlignment in a TextBlock. Does anyone know the code associated with this? I have so far onl created simple DependancyProperty's as below: public static readonly DependencyProperty AlignProperty = DependencyProperty.Register("Align"...

How to draw color wheel in WPF application?

I started to play with WPF and wanted to draw color wheel on a form. At first I tryed to use LinearGradientBrush on ArcSegment like this: <Path StrokeThickness="35" Height="150" Width="150"> <Path.Stroke> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Color="Red" Offset="0.15" /> ...

Dynamic TextSize in WPF UIElements

Hi, As suggested I allow all of my WPF UIElements to have a dynamic size so they can be resized easily however, in TextBlocks I have to specify the size of the Font. This means when the element's size increases or decreases the Font size stays the same. Is there a way for the Font size to be dynamic? Cheers, James ...

Best way to serialize a wpf element tree to Xaml?

What is the best way to serialize a wpf element tree to xaml so that I can get a design time representation? XamlWriter.Save is having serious limitations, and it can provide only the run-time representation Probably Microsoft don't want any one to build a customized xaml designer with out much effort :( ...

WPF equivalent to TextRenderer

Hi, I have used TextRenderer to Measure the length of a string and therefore size a control appropiatly. Is there an equivalent in WPF or can I simply use TextRendered.MeasureString? Cheers, James ...

Can I use the office 2007 window style?

I like the Office 2007 window border (how it looks in windows XP). Is there a way to use this same border in my WPF application? Maybe it is included in RibbonX, however the whole package seems to heavy for my application, when I only want to have the same border style. If all this is not possible, can someone give me some advice on ho...

How can I use Expression Blend to edit a DataTemplate created in Visual Studio?

For those of you using Expression Blend as well as Visual Studio in your real projects, please help me understand how you use Blend and Visual Studio in your everyday development/design tasks, here is a real scenario: I created the following simple WPF application in Visual Studio. It shows a list of customer objects with a DataTemplate...