wpf

Tutorials For Caliburn Framework?

I'm learning Caliburn for a WPF project I am involved in and we are having a hard time finding good tutorials for it. I have looked through the Caliburn Wiki, and the samples that come with the download, but either the tutorials are lacking, or I am. =D I cannot view solution folders in VS Express so maybe I am missing some valuable s...

DataTemplate, LoadContent and DataTriggers not firing

I have a custom UserControl which has a DependencyProperty "ItemTemplate" of type "DataTemplate". I create an instance of this ItemTemplate via .LoadContent(), assign the .DataContext and put it an ContentControl. The only drawback I have is that DataTemplate.Triggers are not fired. Example Xaml Code: <Window.Resources> <DataTempla...

How to model a scrolling line graph in WPF?

I'm trying to re-learn WPF and I've started a little project that has a line graph, kind of like the CPU performance one you would see in Taskmanager. The graph is basically a canvas that has a punch of lines added to it's children and is based on an Avalon sample I found here http://msdn.microsoft.com/en-us/library/aa480159.aspx Curren...

XML databinding to TreeView (or Tab control), bind attribute based on different attribute

Hello, I have some xml: <Test> <thing location="home" status="good"/> <thing location="work" status="bad"/> <thing location="mountains" status="good"/> </Test> The leaves on the TreeView are the values of the status attribute; the nodes will be the value of the location attribute. ├──bad │.....└──work └──good .......├──home ....

Recordings of WPF-LOB Training Sessions?

Hi, I was wondering if anyone recorded (audio or video) any of the WPF-LOB Training sessions put on by Karl Shifflett and Jaime Rodriguez? I was particularly interested in the databinding session. All of these sessions were so awesome (I attended the Chicago event) and wish that they had been recorded professionally. thanks, Bill ...

WPF :Inheriting styles for third party controls

Hi, I am using telrik components for wpf. I want to get "Select all" Check Box on Grid Header cell I have Common ResourceDictionary Style.Xaml , it has <ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"&gt; <Style TargetType="telerik:GridViewHeaderCell"> <Setter Property="FontWeight" Va...

What are some fast and simple implementations for a segmented progress bar in WPF?

More specifically, I tried having a grid of 48 rows, 40 units high, contained in a scroll viewer... each row was to contain a progress bar, but for whatever reason, this really REALLY slowed down my user interface, so I've scrapped it. My questions are as follows: Why would the progress bar cause such extreme slowdown, especially while ...

WPF -- override style colors, best practice

Hello, I have a style for a GlassButton. The problem is that the gradients are built in the style and the colors are set in the gradients. Now, I have a framework for a button that I like but I need different buttons to be different colors. Is there any way I can "expose" one or more of the color properties from the Style to override...

Dynamic WPF geographical map display usercontrol

I am designing an application where I basically want to load geographical maps that are defined using paths (outlines of countries). The Maps should be displayed on my Window and when I hover each country on the map, it should change color. I managed to do this partially by exporting an svg map to xaml and including this xaml in a cust...

Planning and development steps for first program

I am in the preparation stages of writing my first real program. I've designed a set of tables to store my financial data. I know 1) what data goes where in the tables 2) what relationships exist between tables and fields 3) what queries are needed 4) what the forms should look like to write data to the tables 5) what output I need an...

Modifying a DataTable

Situation: Hello! I am trying to populate a WPF toolkit DataGrid with a MS Access database. Here is what I have right now (it works): //Load the datagrid with the database private void LoadDataGrid(string filename, string path) { string databaseConn = "Provider=Microsoft.ACE.OLEDB.12.0;" + ...

Dynamic Scoped Resources in WPF/XAML?

I have 2 Xaml files, one containing a DataTemplate which has a resource definition for an Image brush, and the other containing a content control which presents this DataTemplate. The data template is bound to a view model class. Everything seems to work EXCEPT the ImageBrush resource, which just shows up white... Any ideas? File 1: D...

Changing WPF title bar background color

I have a WPF windows application. I need to change the background color of the title bar. How can I do that? ...

How to set WPF string format as percent wihout multiplying by 100?

I have a textbox bound to a property in an object. I have setup the string format to be p0. However, when I enter 12 for example it is formatted as 1200% (multiplies by 100 and add % sign) How can i set the stringformat so that for exampe 20 is formatted as 20% ? My current control is : <TextBox Text="{Binding Path=MyCase, Validates...

WPF: How to embed button inside text flow (wrap text around button)?

Hi everyone, I'd like an advice to the following problem: I want to embed a button into a text flow, but when I embed a Button and Label (or TextBlock) into the WrapPanel, I get the first figure: I think that one of solutions could be FlowDocument, but I feel that this is far too heavy for a control simple like this (which could be us...

WPF ListView Binding with UpdateSourceTrigger set to explicit strange behaviour

Hi, I have a listview with different the datatemplates set up to bind. I want to update some of the columns (mix of textblock and progress bar) when I call UpdateSource() on a bindingexpression. I also want to update 1 of the columns when the property is changed which it is bound too. I was able to get the PropertyChanged behaviour to ...

How to access c# WPF control in thread safe way?

I've tried using the examples from MSDN for this but they seem to only be applicable to Windows Forms. For instance the method of using .InvokeRequired relies on the windows forms control, however this method isn't available for WPF controls. The Backgound worker method throws an InvalidOperationException as well - The calling threa...

WPF WebBrowser Cookies to be used in WebRequest

I try to construct WebRequest to a web page after successful logging in to secured web portal via WPF WebBrowser control, but stuck with the problem of reusing WebBrowser cookies in WebRequest. Unlike WinForms, in WPF WebBrowser control there is no way to extract CookieCollection via WebBrowser.Document.Cookies because Document object ...

C#: Send input from inactive window.

I'm trying to send input from a WPF Window which doesn't have focus. The idea is to create a virtual numpad, whereby pressing Alt+M for example sends Alt+Numpad0. I've got Michael Kennedy's global hooks working, but I can't find a way to: 1) Send keys from an inactive window 2) Swallow these keys so they're not processed by the applicati...

Filtering a dataset in wpf

Hi, I am developing a WPF dictionary app. I have a listbox and a text box in my XAML code, based on the user input in the text box the Dataset must get filtered and the list box must only show the relevant rows. For example: if the user types in the 't' in the text box the listbox must only show words like 'television My problem is t...