wpf

Updating DataTrigger manually or run synchroniously

Hello, I hope you can help me, I have a problem with WPF DataBinding in a FlowDocument. Here's a short description what I want to do: My aim is to print or export a XPS-Document which is build from a FlowDocument. In the FlowDocument I set some XML-Bindings which should represent the content of the XMLNode. In my XMLSource i'm storing v...

Wpf Calendar Control Customization

Hello All I have a calendar control (WPFToolkit) in a wpf form and I need to put a "Today" button in it. Is there a way to di that? Thank you in advance ...

MVP/MVVM - Filtering of lists, who has responsibility?

Hi, I'm implementing a wpf application which display a list of items, and provides the functionality to filter this list by typing in a textbox (quite trivial use case i think). We're using a MVVM structure. My question is, whose responsibility is it to filter the list? The view or the viewmodel? Should I implement an "OnTextChanged" ...

Can I do a fillet curve in WPF?

My understanding of a fillet curve is that given three points where the middle point is associated with a radius, one can draw a curve from the two extreme points using a circle defined by the radius. Is there support for this in WPF or would I have to implement it myself? ...

How to enable ribbon menu?

<r:RibbonWindow.Resources> <ResourceDictionary> <!--Ribbon Commands--> <r:RibbonCommand x:Key="cmdPrint" CanExecute="RibbonCommand_CanExecute_Print" LabelTitle="Print" LabelDescription="Print" ToolTipTitle="Help" ToolTipDescription="This is used to Print" SmallImageSource="Images\printIcon.png" LargeImageSource="Imag...

Creating something similar to Dispatcher for SQL DataContext

My current project is a WPF application with an SQL Server back end. In WPF, the UI can only be modified by the UI thread. If a UI modification needs to be done on another thread, then the dispatcher object can be called and given an action. Effectively, this is mapping my Delegate to a WM_ message. Since the linq datacontexts to SQL S...

WPF - LayoutUpdated event firing repeatedly

I've been adding a bit of animation to my WPF application. Thanks to Dan Crevier's unique solution to animating the children of a panel combined with the awesome WPF Penner animations it turned out to be fairly straightforward to make one of my controls look great and have its children move about with some nice animation. Unfortunately...

Does overriding default style/controltemplates break theming?

When I override the default style/controltemplate of a standard WPF control in blend using "Edit a Copy" without modifying it (just creating a local copy of if), will this already break theming in some scenarios? In other words, do different themes provide differnt controltemplate- and/or styledefinitions for the standard controls? How c...

Good approach to learning to use WPF design tools?

I want to learn WPF but from all the commentary I've been hearing the tooling in Visual Studios is weak and would require me writing XAML by hand which is inefficient. I've seen tools such as Expression Blend that are used to create XAML however given my complete lack of understanding of WPF I'd be hard-pressed to get enough "mileage" o...

Grid with an image, textblock, and rectangle, inside a listbox not showing up exactly right

So I have this Xaml inside a ListBox Item Template: <ListBox.ItemTemplate> <DataTemplate> <Grid Height="22" Width="Auto"> <Image Margin="-2,0,0,0" Source="{Binding Path=ADsPath, Converter={StaticResource ImxConverter}}" HorizontalAlignment="Left" Width="22" /> <TextBlock Margin="20,3,0,0" Text="{Bind...

What could be causing db.SubmitChanges() to not work in linq-to-sql?

I've set up a very simple example with LINQ-TO-SQL in WPF. I can get an object (pageItem) out like this and I can change the property and when I call SubmitChanges() it gives me no error but it doesn't save the change. MainDataContext db = new MainDataContext(); var pageItem = (from p in db.PageItems where p.Id == 1 ...

WPF Scale Transform and ScrollViewer - When Zoomed can't scroll beyond original size...

I have a StackPanel inside of a ScrollViewer. I have a slider that does a scale transform on the stackpanel to allow zoom-in and zoom-out functionality. The problem is that when I zoom in, the scrollviewer doesn't treat the content as being 'bigger'. So, if I scroll in a little and scroll as far right as I can go - it stops me before ...

Having trouble binding list/grid to collection

I have set up a grid and bound it to a collection. I can edit the items in the collection through my grid and the changes get propagated to the collection. And, the GUI is showing everything in the collection at the time the ItemSource is set. But, I am programmatically changing some of the items in the collection (after the ItemSourc...

WPF SystemColors.HighlightTextBrushKey IsFrozen=True; How to change Foreground of Selected Item on ListBox Control

I have this Xaml <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Value="#123456"/> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Value="White"/> THe first one works, the second one does not. On MSDN, SystemColors.HighlightTextBrushKey says that it "IsFrozen" and cannot be ch...

WPF DataGrid - row for new entry not visible

The problem is, that the blank row in the DataGrid isn't appearing, ergo user can not add data. Here is the code: System.Collections.ObjectModel.ObservableCollection<CoreVocabularyEntry> dataList = new System.Collections.ObjectModel.ObservableCollection<CoreVocabularyEntry>(); public VocabularyToolWindow() { InitializeCo...

WPF Toolkit DataGrid Multi-Select: How to get SelectedItems out?

I'm using the WPF Toolkit's DataGrid. I've enabled the property on the DataGrid to allow for multi-selecting of rows. How do I get the SelectedItems out? I'm using an MVVM framework to bind my ViewModel to my View. Thanks! ...

wpf app appears to be blocking extended screen functionality on hp laptop

Hi, I ran into a strange issue where "fn_key -- F4" combination on my hp laptop to extend the screen would stop working once I have a wpf application running. This happens even when I create an empty app -- as soon as I run it, I can't extend my desktop to a second monitor. Thanks! ...

Where can I find information about creating 3D controls in WPF?

I am about to start to make the interface for a game in WPF / Silverlight. I'd like it to have a nice look all in 3 dimensions. Can you point me to some good resources, tutorials, books... on how to develop real 3D controls, like Buttons and such? ...

MVVM: Editing a Customer. How to find a workspace with the same object and to create a new workspace from another workspace

Just like this question, I'm learning MVVM using the sample created by Josh Smith and I wanted to add a functionality of update. Two problems arise (not addressed in the referred question): What is the best and light way to create a workspace from another workspace? How to find if there is already a workspace editing the same custome...

Tracking down a AccessViolationException in WPF

I've written a WPF application that uses many Frame controls to view camera feeds. When deployed, it crashes pretty randomly (anywhere from 2 hours to 16+ hours), and I see these in the event log, consecutively: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other...