wpf

MultiScaleImage functionality in WPF

The MultiScaleImage control (DeepZoom) is not available in WPF, only in Silverlight. How would you suggest getting similar functionality in WPF? I know it would be possible to host Silverlight in a browser control in WPF but this is my last resort. I don’t need all functionality of MultiScaleImage. In my application I’d like to have one ...

Saving WPF content to an aribitary format

WPF has a framewok for serializing WPF to an arbitary format (such as html, rtf, xps) where 3rd parties can plug in. Has anyone ever seen (or written) any serializer except the XPS one that comes with the framework that we can use? ...

How do I change an image on hover over in WPF?

Maybe I am missing something really simple but a Google search returned no usefull results when searching on how to change an image on when i hover over the image. All i have so far is :| ...

Do I load data at the Model or at the ViewModel?

Josh Smith loaded the dummy data on the Model on this demo, while Tim Heuer loaded the dummy data on the ViewModel on this demo. Which one should I follow? :S ...

WPF toolkit datagrid cell text wrapping

My WPF datagrid's columns are fixed width, which means long text in the rows are cut off. How can I have the text wrap? ...

(WPF) UI best practices

Hi, we are curring analyzing whether to implement a solution for a software application by using either WPF or WinForms. Apart from that decision, I just wanted to ask whether someone of you has good resources in terms of UI design (i.e. layout) (papers, case studies, links, books...), preferably targeted to WPF. I do not necessarily ...

Is there any Visual Studio like code editor control?

I want to write an IDE in C# for my custom scripting language. Is there any code editor control with the IntelliSense popup, colors, etc for WPF/WinForms? Thanks. ...

Free XamlPad Alternatives

I was using the XamlPad from the .NET SDK, so I did a quick search for something similar but with more features and utility. My search turned up multiple alternatives, so I was wondering if anyone had any specific recommendations on which XamlPad alternative to choose. ...

WPF C# Classes, TextBox and Reference, Easy(?) "does not exist in the current context"

Hi, I'm pulling my hair out. I have created a class "employee.cs". I developed this class originally within the "public partial class Window1 : Window" on "Window1.xaml.cs". When moving it to a sepate class I can no longer refernce textBoxes, comboBoxes etc. What do I do?? Error given is "The name 'textBox1' does not exist in the current...

How do I databind to a ViewModel in Expression Blend?

In WPF and Silverlight you can make a view model object and set it into the DataContext of a control when the control is constructed at runtime. You can then bind properties of the visual object to properties in your DataContext. One way to set the binding is to type the binding directly into the tag: <TextBox Text="{Binding Path=Desc...

How to add a font to a XPS Document

Hi, I am using a derived class of DocumentPaginator for generating reports in WPF, But I have problem with fonts I am using a special font which should be embedded into the document otherwise the XpsDocumentWriter will convert the text to image automatically and it doesn't look good when printing in high dpi modes. I have searched a lot...

Can you set the content of a button in wpf with a style ?

When I try this, all the buttons turn blue, but the content isn't set. <Window.Resources> <Style TargetType="{x:Type Button}"> <Setter Property="Background" Value="Blue"/> <Setter Property="Content" Value="Edit"/> </Style> </Window.Resources> Any ideas? EDIT : This example was indeed somewhat too ...

WPF/XAML - compare the "SelectedIndex" of two comboboxes (DataTrigger?)

hello, i've got two comboboxes with the same content. the user should not be allowed to choose the same item twice. therefore the comboboxes' contents (= selectedindex?) should never be equal. my first attempt was to comapare the selectedindex with a datatrigger to show/hide a button: <DataTrigger Binding="{Binding ElementName=comboBo...

WPF : Help! Visual Brush streches all content

In my project I want to display a small logo on the side of a custom control. Since I have no canvas I thought maybe a Visual Brush would be a good Idea to place the logo in the background. <VisualBrush> <VisualBrush.Visual> <Rectangle Width="200" Height="200" Fill="Red" /> </VisualBrush.Visual> </VisualB...

wpf custom control xaml null error

Yet another strange WPF error: I have a custom control in a simple XAML page. The project builds and runs perfectly, with no errors. Here's the XAML: <Window x:Class="Grapher2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:graph="clr-namespace:Gr...

WPF UserControl of Buttons: How to implement the UserControl?

I've got a UserControl that has 3 buttons in it, Add Edit and Delete. Nothing crazy here. On my parent UserControl, I insert my buttons UserControl. They show up as expected. But I want to bind Commands to each of the buttons from my Parent UserControl. How do I access each of the buttons' paremeters from the Parent UserControl? ...

Combobox Databinding as an element inside of a Listbox in WPF

I'm having trouble with a combox databinding, this is what I'm trying to have it setup like: 1) Combo box is an item inside of a ListBox control [working] 2) Combo box's "Text" should be bound to a value from the ListBox ItemsSouce [not working] 3) The combo box will have an itemssource bound to a list that is retreived from a databas...

How to get a list of controls in a groupbox in WPF

In standard WinForms development I would do the following: foreach (Control in groupBox1.Controls) { MessageBox.Show(c.Name); } How does a guy do this in WPF? I have a Grid inside the GroupBox and a number of controls in the grid (buttons etc.) but can't seem to figure out how to get each control. ...

RenderCapability doesn't tell the full story

We have a WPF application running on a PC with two video cards (one fast, one slow). The default monitor is connected to the fast card. Our application starts on the "fast monitor" showing RenderCapability.Tier = 2. WPF Performance Suite confirms it's using hardware rendering. However, when I drag the app from the "fast monitor" to "slow...

WPF TreeListView

Hi everyone! I was wondering if anyone knows how to use the TreeListView in WPF/XAML/Expression Blend. Without using the code behind. This what I want to do. I would like to populate a TreeListView with information, if the information's client and matter are the same, then just make that item a child of it. Example: Client 1= Kevin, ...