wpf

Rebinding to WPF Datagrid's Datacontext

I can't believe I am stumped with this fairly straightforward thing. I originally posted this in the WPF datagrid codeplex discussions but got no response. So I am trying here: I can't seem to find a way to do this. I create a datagrid whose datacontext is initially filled with rows from a table. I have implemented a search function...

Binding custom dependency property to custom WPF style

I have an issue when designing a inherited Expander. My intention is to have a progress bar behind the toggle button and text in the default Expander header. I have this XAML code which gives me the progress bar in the header. It is a custom style. <Style x:Key="CurrentScanExpanderStyle" TargetType="{x:Type local:ProgressExpander}"> ...

Color palette (colors used) for RibbonWindow's Office 2007 Black theme?

I am using the Office 2007 Black theme for my RibbonWindow and really like all of the colors it uses. Here is the resource dictionary included in my ribbon window's resources. <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Black.xaml"/> I would like to mirror the colors of this theme in my user controls....

where did my memory go? large private bytes count

I have a WPF app that among other things display a lot of images, large and small. My problem is that the app uses a lot of memory and I cannot figure out where it's coming from. The scenario, when stressing the app some I get this graph in perfmon: The big black line is Process\Private bytes and the other lines are the CLR mem count...

WPF Binding: Where a property contains the path to the value

Hi, I've got an expander with a couple of TextBlocks in the top bar which i'm using to give a title and a piece of key information. Ideally i want to set the path to key piece of information, but i can't work out how to bind the path of the binding to another path (i apologise if i'm not making much sense!) In the following xaml the f...

Find all controls in WPF Window by type

I'm looking for a way to find all controls on Window by their type, for example: find all TextBoxes, find all controls implementing specific interface etc. Thanks ...

Where should I put initialization code so it would be executed in before VS initializes my control in design mode

I have a method Translate extension which searches for a translation. Normally translations are loaded in Window constructor (I tried in App.Setup too). No if i run the application all the translations are displayed correctly, but when opening a user control all translations are gone. So the question is where do I put my initialization ...

Wpf DatagridComboBoxCell

How to create datagridComboBoxCell in Wpf so that runtime i can bind that cell?? ...

WPF Dispatcher and Running it in background

I tried to wrap the dispatcher in a thread. But the result is not what i expect. How can i solve that problem? public void Start() { ThreadStart ts = inner; Thread wrapper = new Thread(ts); wrapper.Start(); } private void inner() { _Runner.Dispatcher.Invoke(_Runner.Action, DispatcherP...

Can I declaritively create a collection of strings?

I'm just mucking about with some wpf stuff and I want to quickly create a list of strings that I can use as a resource. Can i create a list decoratively in xmal? ...

Silverlight and icollectionview

So I have a datagrid that I need to add custom sorting for and I also need to know the exact order of the sort. I have read in order to do this I need to implement a custom icollectionview and bind it to the datagrid. The problem I am having is that the documentation Microsoft gives on this interface is not that great. Does anyone kno...

MVVM-pattern for a Paint-like WPF-Application?

Hi girls and guys! I'm currently in the planning phase for a project of mine. I thought about using the MVVM-pattern for my application for testability, maintainability etc. I have only started to get my head around MVVM but there is one thing that I just can't figure out in the context of my planned application. My application aims t...

Wpf Listview performance with filter and sort enabled

Hi All, I have WPF listview, with around 1000 records in it. I am doing on the fly filtering of listview items, that is as user types in to text box control, it matches items with text box content and filter items in to listview. So far filtering was working fine and it was pretty fast. Recently I have implemented custom sort on this ...

Opening a new window in WPF

Hi, I want to open a new browser window with a specific url (say http://google.com") when I click a button in my wpf application. How to do it? ...

WPF: Best way of adding "connectors" between items in different listboxes

I have a bunch of usercontrols, each with listboxes in them. I want to make it so that connections between items in these listboxes can be connected between the different controls, and show this visually by drawing lines between them (like in a diagram). That is, item1 in listbox1 is connected to item5 in listbox2 by drawing a line betwe...

WPF - Border around an itemscontrol

Hey, I have an itemscontrol with a custom panel inside a usercontrol. The usercontrols size is only constrained by the parent window size. <UserControl> <Grid> <Border BorderBrush="DarkGray" BorderThickness="5"> <ItemsControl ItemsSource="{Binding ActiveGame.Grid.CellsFlat}"> <ItemsControl.ItemsPanel> <Ite...

Listbox scrollbar thumb changes size when content is variable height

I have a ListBox with many objects displayed, each of which can be a variable height, based on the number of values each object has. See my previous question that was answered here. Many objects are 5-lines high, while others are 1. The scroll bar in the ListBox does not appear to like this, probably due to the virtualization. While you...

WPF Control positioning difficulties...

Hi I try to do something supposed to be extrely easy but it is now 3 hours that i can't... I try to have 2 buttons "OK" and "Cancel" close to another but it does not work , whatever i do on the cancel button it makes it invisible, here is the code: <Grid x:Name="LayoutRoot" Height="242"> <Grid.ColumnDefinitions> <ColumnDefinition ...

Useful book for WPF ?

Duplicate: What WPF books would you recommend? What is a good book for learning advanced WPF material? What is the best book for learning WPF? Where can i learn WPF bindings in detail? ...

How can I make a Windows Explorer file preview screen in WPF?

I'm working on an application that will have attachments, and I would like to create a type of display like in windows Explorer, where you choose a "Details" view, and also show the preview pane. I would like to be able to show a thumbnail view of the attached file currently selected, based on the file extension. Does anyone know where...