wpf

NHibernate list/detail views using different sessions, but changing same object

Hello, My application consists of two views, list and detail. Basically when user double-clicks a row from a list, I pass selected item object to detail view. Every instance of view has it's own NHibernate session. When user modifies object properties, my list view needs to reflect changes, to do this I implemented INotifyPropertyCha...

Using System.Type in XAML

I need to be able to set a property of type System.Type in a UserControl. Im currently doing this: XAML: <MyUserControl x:Name="TheControl"/> Code behind: TheControl.TheType = typeof(My.NameSpace.MyType); Im looking to be able to do this (XAML only): <MyUserControl x:Name="TheControl" TheType="??"/> Is there a way to use typeof...

DataGridHyperlink Column click issue

Hi, In my wpf data grid i have a hyper link column for item code. If user clicks on any item code i'll show item details in a popup form. It's working fine in one page but in one page first click only it's working.If i reload the grid it will work for first click. When i debugging i observed that hyper link click event is firing for fi...

WPF: What causes ScrollContentPresenter to clipp the ItemsPresenter ??

I have a ListView with a custom virtualization panel, the problem is the ItemsPresenter is showing the realized items, and I can see them in Snoop, but, the ScrollContentPresenter simply dose not show any thing, and I get blank view! ...

Dynamically filling ListView with an image and a string

I would like to fill my ListView with do aligned elements, a little icon (either a confirm mark or a cross) and a string which contains the result of a question (Right / Wrong, that's why icon). daInserire = new ListViewItem(); daInserire.Foreground = new SolidColorBrush(Colors.DarkGreen); daInserire.Content = "Giusto: "+ straniero.Text...

WPF: how to implement a UserControl to edit line-points ?

I have a class with a member ObservableCollection<Point> Points; I want a custom usercontrol that shows a canvas with these points on it, drawn as a closed polygon, and the user should be able to select and move individual points. I've googled around and found a lot of stuff on adorners, moving controls etc., but I'm still confused ...

How to Achieve Lazy Binding of Tab Page Controls in WPF?

Hi, I have an entity class. This entity has lots of properties and entity's data is shown to the user in several tabpages of a tab control. I also implement mvvm approach. When the screen is shown to the user first, I want to bind only the active tab page controls and when the user navigates through tab pages seperate bindings will b...

how to animate transition from one view to another when using data templates to associate view with view-model.

Hello everybody, i will post my source code i have at the moment and explain my problem after that. this is the window where i want the transition to happen <Window x:Class="MyApp.MainView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MyApp" Height="600...

Capturing all requests and responses from the web browser control?

Is there way to capture and print out all of the requests and responses from the web browser control including asynchronous requests? ...

Altering the Center of Rotation of a ScatterViewItem

By default, when manipulating a ScatterViewItem control it will rotate about its own center point. Is there any way to alter this such that the control rotates about another point, for example rotate about its own top left corner? ...

How to draw a line on an existing BitmapSource in WPF ?

Hello folks, I would like to draw a line (or any geometric shape) on an existing BitmapSource object in my WPF application. What is the best way to do it ? The BitmapSource is the result of a BitmapSource.Create(...) call. Thanks Romain ...

WPF Richtextbox and keyboard shortcuts

Hello, I'm implementing a WPF application with a richtextbox for German users. They want to use their "normal" keyboard shortcuts to do some basic formatting: bold, italic, underline. In English, the shortcuts CTRL+B, CTRL+I, and CTRL+U are working in the Richtextbox. However the "normal" German shortcuts are CTRL+SHIFT+F (Fett = Bol...

create a list using ObjectDataProvider

How do you create a list of bool values using objectdataprovider? I need to bind this collection to a combobox. ...

WPF - ObservableCollection PropertyChanged event?

I have an object which has a property of type ObservableCollection<bool>. It is bound to a list of checkboxes on a form using TwoWay bindings. I would like to add a PropertyChanged notification to this so that if certain values are selected, some other ones get automatically deselected. Is there a way to do this? The ObservableCollect...

WPF - Resizing controls within a window with resize

So I'm pretty new to WPF and I'm having trouble with the layout of my Window. Currently I have a WPF application with a Grid defined as such: <Grid.RowDefinitions> <RowDefinition Height="23" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefiniti...

How can I cycle through a mix of images and videos in a WPF application?

I have a WPF Kiosk application and it has a background timer that will redirect the user back to the home page when there is no user activity. When the Kiosk is sitting on the home page for an extended period of time, I want it to have some sort of screensaver. The screensaver would basically have to pull images/videos/flash files from a...

WPF RichTextBox: How to change selected text font?

Hi, how can I change the font for a currently selected text area inside a WPF RichTextBox? ...

Adding ScaleTransform breaking WPF animation

I am animating an Explorer-style interface, with a Navigator pane on the left and a Workspace on the right. The Navigator displays either a Note List or a Calendar--both are UserControls. Toggle buttons on the app's Ribbon change between the two views. I am animating the change with a dissolve from the old UserControl to the new one. T...

Problem with System.Windows.Automation Namespace

I am implementing WPF Application and i want to use System.Windows.Automation Namespace to capture highlgihted text from applications. The Problem is that Visual Studio and Expression don't identfy AutomationElement, TreeScope, TextPattern and Red underlined it !! i am using Visual Studio 2010 Professional and Expression 4 on Windows 7....

WPF Best Practices: Do custom controls work well with the MVVM design?

I was looking at creating a common control that I will be able to reuse on my pages: an AddressControl which has Address1, Address2, City, State, Zip, etc... Originally I just created a class (AddressEntity) that contained all these items and implemented INotifyPropertyChanged. I included that class as a DependencyProperty in my Code-Be...