wpf

Is there anything like jquery for WPF/XAML?

As the title says: Is there anything that is for XAML what jquery is for HTML? If not, would it be possible to create such a framework? ...

MVVM Exception Handling

I have a WPF Application that I have been trying to write in the MVVM style. If an Exception is thrown (like when a document is opened), I would like to display a MessageBox. Easy to do, but my code doesn't feel quite right because the MessageBox.Show call is in the ModelView. I thought that sort of thing is supposed to live in the Vi...

Two Finger Click Event using Windows 7 Multi-Touch

We would like 2 code samples (C# would be great) of Windows 7 multitouch functionality using .NET 3.5 sp1 and the ManipulationProcessor: A two finger click sample – An event should be raised when a user “clicks” on a UIElement such as a Rectangle using 2 fingers simultaneously (Close together). The click event should be fired when the...

what are the limitations of wpf web browser control?

What are the limitations of WPF web browser control? Is it good enough for a real-life browser implementation? And is it a fully managed implementation? ...

When does WPF subscribe to the PropertyChanged event?

I have a ClassA with an ObservableCollection Property, that implements the INotifyPropertyChanged interface on my window codebehind I have declared a ClassA variable, and initialize it in the Main() method. i'd expect that variable.PropertyChanged would have a WPF event wired to it, but apparently the PropertyChanged event remains null...

Cellular Automaton on WPF

Hi, currently im taking a Master degree course in Computer Sciences, and i´d like to implement a Cellular Automata in WPF. The rendering performance must be enough to display a lattice (grid) containing 200,000 cells. Since updating visuals is very slow in WPF (due to the visual and logical tree), maybe it's better to use old good Pict...

Can you convert a System.Windows.Control.Image to a System.Drawing.Icon?

The title of the question pretty much states the problem. Is it possible? ...

Vertical TextBlock filling verical space

I want to create a TextBlock (or some other element with text in it for display only) that is vertical (-90 transform angle), but I want that element to fill up the vertical space it is contained in, but have a defined horizontal amount (I'm using vertical and horizontal terms instead of height and width since it's swapped when I have th...

What is the difference between WPF and WinForms?

I am programming simple Windows apps. I don't need DB support. Why would I use WPF instead of WinForms? ...

WPF: LostFocus event on a particular control/view/viewmodel

I'm working in WPF using the MVVM pattern, and generally things seem to be working pretty well, as I wrap my brain around the nuances of both WPF and MVVM. However, I'm currently stuck on a particular issue. My actual application is fairly complex, so to simplify, let's take Josh Smith's near-defining article on the pattern and use the...

Why is video in WPF MediaElement taking so long to repeat?

Here's my Xaml for a MediaElement: <MediaElement x:Name="mediaElement" Width="400" Height="300" Stretch="UniformToFill" IsMuted="True"> <MediaElement.Triggers> <EventTrigger RoutedEvent="MediaElement.Loaded"> <EventTrigger.Actions> <BeginStoryboard> ...

WPF drawing that stretches without stretching the Pen

I need to draw some simple lines within a Border control (or similar) that always stretch to the bounds of the Border. Is there a way to stretch the lines only but not its pen? Without involving lots of C#? In this version the lines stretch: <Border> <Border.Background> <DrawingBrush> <DrawingBrush.Drawing> ...

Responding to MS Wireless Notebook Presenter Mouse 8000 presenter buttons in WPF/WinForms

Does anyone know how to respond to the presentation buttons of the Microsoft Wireless Notebook Presenter Mouse 8000 in WPF or WinForms? ...

Maintaining default visual properties with ControlTemplate

In order to apply a triggered animation to all ToolTips in my app, I'm using a ControlTemplate. However, when using a ControlTemplate the ToolTip loses all of its default visual properties as defined, I believe, by the theme. How can I retain all properties except for those that I override? Using the following code <ToolTip Opacity="...

DrawingBrush Performance

Are there any differences when it comes to performance between the following three border objects? <Border Grid.Column="0" Grid.ColumnSpan="2" Opacity="1"> <Border.Background> <DrawingBrush> <DrawingBrush.Drawing> <DrawingGroup> <GeometryDrawing Brush="Red"> <GeometryDrawing.Geometry> ...

Adding ToolTip to ViewPort3D child elements

Hi i would like to add Tool Tip to ViewPort3D child elements when i put my mouse over on it, Only viewPort3D has a tooltip property but not for their childs. Any way to work around it? ...

How do I let my UserControls use the same styles as App.xaml?

I have a UserControl with a Border element within it that I want to style with a particular Border style. It compiles but won't start, giving a XamlParseException, saying, "Cannot find resource ..." Is there a way to do this? Thanks. App.xaml: <cal:CaliburnApplication x:Class="WahnamProgressTracker.App" xmlns="http://schemas.microso...

WPF stop ListView ScrollBar firing click

I am using a WPF ListView with an always visible vertical scrollbar. I have a MouseLeftButtonUp event handler on the ListView. The handler is working properly except when the vertical scrollbar is clicked when it has nothing to do i.e. the ListView box doesn't have enough items to do any scrolling. In that case nothing should happen as ...

How to bind to a property of the ViewModel from within a GridView

I'm using the MVVM design pattern, and the DataContext of my View is set to a ViewModel. In my View, I have a ListView/GridView with ItemsSource bound to a DataTable. One of the GridViewColumns has a CellTemplate that presents a Button. I want the IsEnabled property of the button to be bound to the SelectButtonsEnabled property of my Vi...

Animate the DropDown opening and Closing of a WPF ComboBox.

How can I animate the Combobox dropdown opening and closing? I am using the Aero style for the window as <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" /> But the combobox dropdown is no...