wpf

MVVM Light Messenger Class

Can anybody provide samples/links/simple-illustrations/videos/demos on how to use the messenger class in MVVM Light? ...

Adding a selection box into an ItemsControl?

I have a WPF ItemsControl with a Canvas ItemPanel. Drawing from an internal source, it displays lots of automatically generated Rectangles. As of now, it looks like this: <Window // .. NameSpaces > <Window.Resources> <DataTemplate x:Key="binTemplate"> <Rectangle x:Name="Rect" VerticalAlignment="Bottom" ...

What is the significance of ProjectTypeGuids tag in the visual studio project file

What is the significance of the ProjectTypeGuids tag in a visual studio project?? When I created a WPF application, i am seeing two guids in here. {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Does these represent WPF and Windows type of applications? If I create my own project type (.myproj) that has...

Wpf image browser with images from stream

Hi, I have Dictionary(string path, Image image) from wcf service My question is how to display this in wpf ? Do you know some useful links ? ...

Dynamically display a control depending on bound property using WPF

I've got a property which is a database data type (char, datetime, int, float etc...) and I want to change the control used to enter a value of the selected type. So for text values I want a TextBox and for date values I want a DatePicker. One way I thought about doing it was to have one of each control on my form and set their Visibili...

How do I use global resources in WPF?

I have a WPF application which I would like to use some static resources in. I have created a Resource Library XAML file which contains a resource. I have also added a string into the Resources of the project through the Properties panel. I assumed I could just use these resources with the binding expression: {StaticResource ResourceN...

WPF Custom Control containing a List of Objects

Hi, I have an object Trip in my object model containing a list of Nodes (e.g. NodeName, StartDate and EndDate) and I am trying to build a Custom control in WPF that draws list of rectangles: one for each Node contained in the Trip object (based on StartDate en EndDate) Would you have any hint on how the Custom Control should be structur...

How do I bind selectedItem property of WPFToolkit-Datagrid to my viewmodel property ?

Hi, I have a WPFToolkit-datagrid and a View-model class with a property - "SelectedGridItems" How do I bind selectedItem property of WPFToolkit-Datagrid to my viewmodel property ("SelectedGridItems") ? ...

Writing a custom wpf 'rolling' plot control (are there any components with such functionality?)

I need a wpf plot control that would 'roll' (scroll) as data is fed to it (instead of stretching, etc). Unfortunately i didnt find a working component so now I am considering writing my own control (its plotting features need to be simple). Did anyone write a custom plot/chart control? Is it difficult? What container should I use (Canva...

WPF: Binding to converted object failed!

Maybe the title was not quite exact since I am not sure about how to describe it. I have a user control named NSLTextBlock, below is the definition of NSLTextBlock: public partial class NSLTextBlock: UserControl { public override void OnApplyTemplate() { base.OnApplyTemplate(); } public object HighlightMatchCase ...

Prevent repagination of flowdocument in FlowDocumentPageViewer

I am implementing search highlighting in a FlowDocumentPageViewer by setting the background property of selected TextRanges to yellow. Unfortunately, the viewer repaginates the entire document when the properties are changed. If you happen to be on a page towards the end of a long document, the viewer is blank for a number of seconds un...

Free Windows form MDI based Ribbon

I am looking for Ribbon which supported MDI. No matter for windows form or wpf. Thanks in advance for help ...

How can I load a WPF (xaml) window inside of another WPF windows in a Panel?

Is this possible? I used a Frame control and: show(ex:showwindow.xaml) But I get this error: root element is not valid for navigation ...

How to specify the image scaling algorithm used by a WPF Image?

Is there a way to specify how an image is scaled up in an Image element with LayoutTransform set to a ScaleTransform with integer values for ScaleX and ScaleY? I want to display the scaled image crisply (ie using 'nearest neighbour' scaling), with no blurring. (Imagine how you would want a bitmap editing program to behave when zooming i...

Databinding to individual properties of the main Dataobject

This is my ViewModel Code: vb: Public Property Doctor() As Doctor Get Return _objDoctor End Get Set(ByVal Value As Doctor) _objDoctor = Value OnPropertyChanged("Doctor") End Set End Property Public Property AddDate() As Nullable(Of DateTime) Get ...

WPF Dynamic Layout with ItemsControl and Grid

I am creating a WPF form. One of the requirements is that it have a sector-based layout so that a control can be explicitly placed in one of the sectors/cells. I have created a tic-tac-toe example below to convey my problem: There are two types and one base type: public class XMoveViewModel : MoveViewModel { } public class OMoveViewMo...

WPF Get UI Thread, or how to show a window from NON-UI Thread

Hi everyone, i have a serious problem with my WPF Application. I realized a WPF Control Library to use as an Addin in MS Office 2007. The WPF-Class is instantiated by the host and creates a toolbar with some buttons in MS Office. By clicking a button the wpf window shoud appear. The problem is that i alway recieve the following error: ...

WPF Application Typing in Custom TextBox CPU Jumping from 3 to 80 percent

I have created a RichTextBox called SharpTextBox which indicates and limits the number of characters that can be typed in it. The implementation is shown in the following link: http://www.highoncoding.com/Articles/673_Creating_SharpRichTextBox_for_Live_Character_Count_in_WPF.aspx Anyway when I start typing in the TextBox it goes from...

Error - Cannot find static resource in a WPF application

I'm learning WPF and started with this MSDN tutorial. I was just following the tutorial. When I finished the code as per the tutorial and try to run I get an exception in a XAML page which says "'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '27' and line position '55'." . And inner exception...

WPF: How to programmatically remove focus from a TextBox

I want to add a simple (at least I thought it was) behaviour to my WPF TextBox. When the user presses Escape I want the TextBox he is editing to have the text it had when the user started editing, AND I want to remove the focus from the TextBox. I don't have any problem setting the text for the value it had in the beginning of the edit...