wpf

WPF ListBox with ItemTemplate (and ScrollBar!)

Hello, I have a databound and itemtemplated ListBox: <ListBox x:Name="lbLista" ScrollViewer.VerticalScrollBarVisibility="Visible"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox IsChecked="{Binding Deleteable, Mode=TwoWay}" /> <Label Content="{Bindin...

Newline in a WPF-label ?

How can I add a newline in the text of a label in WPF? eg.: <Label>Lorem ipsum</Label> ...

How would I databind a Paragraph to a TextBlock?

How would I take a Paragraph object and databind them to the TextBlock for use in a DataTemplate? A plain bind does nothing, just a ToString() of the Paragraph object. The InLines property would let me add a list of TextRun's that make up the Paragraph manually, but that can't be bound to and I could really do with a binding based solut...

Is it possible to achieve the "Aero Glass" look on XP?

Does anyone know any kind of framework that enables (not exactly the same, but) Vista's Aero Glass on XP? I need to develop a little desktop application with WPF, which has a Vista-like UI on XP. I don't need exactly the Aero Glass, some UI like "Windows Live Messenger" will do the thing. Is there any way to make it a reality? ...

Visual Studio 2010 - WPF / Silverlight and built-in Grid

I haven't had a chance to look at VS2010. Is there a built-in Microsoft Grid for WPF or Silverlight yet? ...

Distributing WPF apps to a legacy user base: How seamless is it?

I'm considering developing a WPF application, to be hosted by a legacy Windows app (C++), and I'm trying to get a better sense of how feasible it'll be to do so, given the broad user base I'm targeting. Knowing WPF targets .NET 3.5, I'm looking for some insight as to what the field looks like right now -- who's already got the runtime, ...

WPF: ListView with icons view?

Hi all, I can't figure out how I can implement an Icon View in the WPF ListView (a view similar to the Windows Explorer). Searching on google I only found informations about implementing the GridView but no clues about the Icon View. I'm not talking about System.Windows.Form.ListView but System.Windows.Controls.ListView. Perhaps there i...

Knowledge of which other languages helps to understand WPF concepts.

One thing i noticed about WPF is that it combines various concepts from other computer languages i know, while other concepts are (were) completely new to me. Experience in which languages can help WPF-newbies to understand the different WPF concepts? For example if you know XSL, then DataTemplates will look familiar and the seperatio...

Is there a WPF control I can use to expand/collapse panels (animated)

I have a window that has a lot of content. I'd like to be able to separate the content using panels, and have a separator that the user can click on the toggle between each panel (with an animation that moves the separator from left to right, showing one section and hiding the other). Think of the Microsoft Office (2007) navigation pane....

Do you use FeatureConnectorAttribute or FeatureAttribute in the simple case to add a feature provider to a type?

I'm looking into implementing design-time support for some WPF controls, and I'm confused by the MSDN article Feature Providers and Connectors. In the How Feature Providers are Created at Design Time section, it mentions that in the simplest case, you can use FeatureConnectorAttribute to associate a feature provider with a class. This ...

VS2008 silently dies A LOT when working with WPF

When working in VS2008 (C#) does VS2008 silently crash for anybody when working with WPF? If I touch the XAML it is most likely to crash. I can come back in, clean, then build, then run and it work until I have to touch the XAML again. Then start over again. It is a solution with about 12 projects in it. Thanks, jeff ...

is there a WPF version of FillRectangle

Hi, I want to draw (via mouse drag) some rectangles onto a canvas. Normally I'd use the Graphics class and FillRectangle on mousemove. Does anyone have any good resources for doing this in WPF? ...

hiding grids using ESC key

Hi, I'm new to WPF. I have like 15 grids on my Window and I have a small menu on which I can click and choose which grid to show up or hide. One grid at a time only. I would like that grid to hode (fade out) when I hit ESC. I have all the animations already, I just need to know what grid is visible (active) at the moment. I don't know h...

InvalidOperationException when editing TextBlock.Inlines from inside OnTextChanged

I'm getting InvalidOperationException somewhat randomly in the following code, what's a good way to fix it? public class ParsedTextBlock : TextBlock { static ParsedTextBlock() { TextProperty.OverrideMetadata(typeof(ParsedTextBlock), new FrameworkPropertyMetadata("No Text Set", FrameworkPropertyMet...

Is WPF Dispatcher the solution of multi threading problems ?

Hi, I have a very bad feeling about using lock in my code but now the Dispatcher of WindowBase exists and I want to use it everywhere. For example I use a multi thread singleton WCF service who publish events on the EventAggregator of PRISM, the payload is immutable (it is just data) and every thread with a dispatcher can retrieve the...

how to free Memory ( User Control )

I am using WPF. After adding user controls dynamicaaly at runtime, How to Dispose that user control. Because there is no Dispose Method for User Controls. i dont want to wait untill Garbage Collecter runs. ...

WPF - Anyone have some code that returns normal characters from a KeyDown event?

Hi, I want some code that returns me they ASCII characters when passing it the e.Key property froma KeyDown event in WPF?? Must be someone has such code. Malcolm ...

Calling Select() on WPF text box doesn't do anything.

I'm using a WPF TextBox, and I'm calling the Select() method to make a selection. Unfortunately, it doesn't seem to work unless I select something manually first. Can someone suggest as to why it happens? ...

Is there a way to detect Layout or Display changes in WPF?

Hello! I am trying to check how fast the Frame control can display a FixedPage object when it is assigned to Frame.Content property. I plan to check the tick count before and after the assignment to the Content property. Example: int starttime = Environment.TickCount; frame1.Content = fixedpage; int endtime = Environment.TickCount; ...

How to save entire Scrollable canvas as Png

I have a Canvas class that implements VirtualizingPanel and IScrollInfo. This class is contained inside a ScrollViewer. How can I save the contents of the entire Canvas class only as Png? I know how to save as Png, problem is what is the easiest way to grab only the particular control. When the control is out of view, it gets clipped ...