wpf

WPF MVVM data binding broken after page navigation

I have a Page within a WPF navigation-style application that displays search results. The page contains several data-bound controls. The page itself works fine; it performs the search and returns results. The data-bound CheckBox controls work properly. But if I click a result link and then click the back button to return to the results ...

WPF/C# - example for programmatically create & use Radio Buttons

Hi, Can someone point to an example of how to programmatically create & use Radio Buttons in C# WPF? So basically how to (a) create them programmatically, and (b) how to catch triggers when the value changes, (c) how to pick up results at a given time. Will be interested to see too if the answer will be based on use of a Binding app...

WPF: How add check mark to the textblock?

I am wondering if anyone knows the tag for check mark symbol. I need to have it in a texblock. I looked online for any clue and did not find anything that will work with XAML. Thank you in advance. ...

Binding with Relativesource --wpf

Hi, I have a short question: I have a datagrid and binded it to something. Then I put a combobox in a column and binded it to another source by ItemsSource="{Binding DataContext.Users, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}" Now I want to use datagrid's source again, in the combobox again.That...

WPF Binding question

I have a question regarding the binding I have two textbox, textbox one is bind to the property NAME and has the tag FULLName < TextBox Name="NewTextBox" Tag="FullName" Text="{Binding Path = Name}" > In the second textbox I need to bind to the property that is available as the tag on the first textbox. How to do it in XAML? ...

WPF MVVM User Control binding problem

Hello, I have an wpf mvvm application. I try to write checkbox list control. I can bind the checkbox list elements. Added to this issue, I want to get sum of the selected checkbox list elements values. I added DependencyProperty and bind it to view model property. But, they dont fire each other. CheckBoxList User Control Xaml <ListB...

ListBox.ItemsSource binding in code and in xaml

I wrote simple code like public ObservableCollection<string> Names … public Window1() { PutInDataIntoNames(); InitializeComponent(); this.listBox1.ItemsSource = Names; } and in xaml <Grid> <ListBox Margin="10,11,10,16" Name="listBox1" Background="Black" Foreground="Orange" /> </...

WPF Menu item "_" disappear on mouse over

Hi, I have implemented a Menu with hot keys functionality. Following is the XAML i used, <Menu IsMainMenu="True" x:Name="mainMenu" Background="#FFACC9F7" Height="20" Margin="1,6,-1,0" VerticalAlignment="Top"> <MenuItem x:Name="fileMenuItem" Header="...

WPF/Ribbon: Any control like color picker? How to create a simple 1?

what control can i use to allow users to select color. or else how would a simple one be created. since this is just a practice project ...

What are the advantages of silverlight out of browser over wpf or vice versa?

In fact why would one want a wpf app instead of silverlight out of browser? ...

Binding ScatterViewItems to files

Hi, I'm developing an application using the Surface Toolkit for Windows 7 beta and stumbled upon this problem: I'm having a ScatterView which should show all files in a folder. Therefore I use a FileSystemWatcher that recognizes adding, deleting and renaming files. For presenting the files I define the ItemTemplate. So far so good. I...

How do I point to the data files for a wpf web application (once published)? Getting the executing directory does not work.

Hi, So when debugging simply getting the executing path and accessing files in reference to that works fine, e.g. string applicationDirectory = System.IO.Directory.GetCurrentDirectory(); or One of the many other ways of getting the directory. It gets the directory with the WPF app in it and I can work with that fine. However, once I...

Can I create a KeyBinding for a sequence of keys in WPF?

Is it possible to define key bindings in WPF for a sequence of key presses like the shortcuts in Visual Studio e.g. Ctrl+R, Ctrl+A is run all tests in current solution As far as I can see I can only bind single key combinations like Ctrl+S using the element. Can I bind sequences using this or will I have to manually handle the key pre...

Is it possible to define two-different color for dashed stroke like selection box in Photoshop?

Currently, I can create polygon-based selection box that has only one color on dashed stroke like the following photo. In the other hand, all photo editors has selection box like the following photo. Is it possible to do this in WPF 4.0 without use double border in same place (two polygon objects place in the same location with dif...

Using MAYA 3D Model in a .Net application

If I want to render a 3D model created by Maya and do some animation with it in a .net application what should be my choice of platform - plain WPF or XNA? ...

Different look in design-mode and at runtime

Hi. I have small problem with WPF. Here is my Style where I created a template for DataGrid Column Header. <Window.Resources> <Style x:Key="DataGridColumnHeaderStyle1" TargetType="{x:Type DataGridColumnHeader}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemp...

TabControl.Items.Remove - Modest Delay + Memory Leak?

I have a TabControl in WPF. When I remove a certain TabItem from the collection, depending on the content displayed in the TabItem, there can be a noticeable two or three second delay, before the TabItem is removed. Any suggestions on how to improve this so that the delay is not noticeable? Also - there appears to be a memory leak - a...

How do I publish a WPF web application in directories of my choosing? Currently installs some of it in Document and Settings ...

Hi, so I have a WPF web application which runs fine when run from Visual Studio. However, when I publish it and load appName.xbap (in a directory like C:\myApp) that in turn loads files located in \Documents and Settings\ ... \myApp. So what is happening is all the actual .deploy files I need are shoved in a place I don't want them. The...

how to display most recently used list in combo box

Hi, I'm using infragistics WPF editors and XamComboEditor. In previous WinForms version there was MRU list capability. What it basically does is it displays list of most recently used items at the beginning of the list and separates those items with some separator (which cannot be selected). Regular list of combo box items follows after...

Binding to ItemsSource not working until visual element is manually inspected (MVVM)

I have the Xaml which should basically bind a set of ContextualButtons for a selected tab's viewmodel to the ItemsSource property of the ToolBar. For some reason, this binding is not actually occuring unless I use Snoop to inspect the element manually...It seems that the act of snooping the element is somehow requerying the binding some...