wpf

Domain Authentication from .NET Client over VPN

I am writing a ClickOnce WPF app that will sometimes be used over VPN. The app uses resources available only to domain authenticated users. Some of the things include accessing SSRS Reports, accessing LDAP to lookup user information, hitting web services, etc. When a user logs in from a machine that is not authenticated on the domain,...

Blend 4 Beta: How to change image source as part of Timeline

I'm trying out Blend 4 beta, and looking for a way to do a simple thing: When a mouse is hovered on an image, the image should change its source to a different image. When the MouseLeave happens, the image changes back. I know I can do it in source code, but I'm looking for a code free way to do it, without hand coding xaml. Blend...

WPF Custom Buttons below ListBox Items

WPF Experts - I am trying to add buttons below my custom listbox and also have the scroll bar go to the bottom of the control. Only the items should move and not the buttons. I was hoping for some guidance on the best way to achieve this. I was thinking the ItemsPanelTemplate needed to be modified but was not certain. Thanks My ...

wpf & validation application block > message localization > messageTemplateResource Name&Type

I'm trying to write validation rules for my data objects in a WPF application. I'm writing them in the configuration file, and so far they are working fine. I'm stumped on how to localize the messages using messageTemplateResourceName and messageTemplateResourceType. What I know is that the strings can be writen in a resource file, giv...

ReorderListView in WPF

I love the controls from the Bag-Of-Tricks. I am interested in modifying the ReorderListBox control to get a ReorderListView control. However, simply changing the base class from ListBox to ListView is not working. When I try to add a ReorderListView to XAML like this: <lib:ReorderListView Grid.Row="1"> <ReorderListView.View...

How do I catch this WPF Bitmap loading exception?

I'm developing an application that loads bitmaps off of the web using .NET 3.5 sp1 and C#. The loading code looks like: try { CurrentImage = pics[unChosenPics[index]]; bi = new BitmapImage(CurrentImage.URI); // BitmapImage.UriSource must be in a BeginInit/EndInit block. bi.Downloa...

ExecutionEngineException thrown in PageFunction navigation, when OnReturn is used.

I'm having a problem with PageFunction navigation. After OnReturn is called an ExecutionEngineException is thrown. "Exception of type 'System.ExecutionEngineException' was thrown." I create and navigate to my PageFunction as follows: void ShowPageFunction2(){ mPageFunction2 = new PageFunction2(...); mPageFunction2.Return +...

WPF: Is it possible to nest TreeView items with a binding expression?

Lets say I have the following data: <XmlDataProvider x:Key="Values"> <x:XData> <folder name="C:"> <folder name="stuff" /> <folder name="things" /> <folder name="windows"> <folder name="system32" /> </folder> </folder> </x:XData> </XmlDataProvider> How can I get that into a treeview? I can't...

Setter for Canvas.Left and Canvas.Top readwrite in WPF but not in Silverlight 4, why ?

Hi, I have the following XAML, which works fine in WPF, but not in Silverlight 4 <ItemsPanelTemplate x:Key="ContentListBoxItemsPanelTemplate"> <Canvas/> </ItemsPanelTemplate> <DataTemplate x:Key="ContentListBoxItemTemplate"> <Border CornerRadius="15" Width="150" Margin="3" Height="300"> ...

How do you filter a view of a DataTable in .Net 3.5 sp1 using WPF c# and xaml?

I found the MSDN example code for getting the default view of a collection and adding a filter to the view, but most of it is for .Net 4.0. I'm on a team that is not currently switching to 4.0, so I don't have that option. None of the examples I found used a DataTable as the source, so I had to adapt it a little. I'm using a DataTable...

PropertyChanged Event of ViewModel in ObservableCollection

Hi All, I have a observable collection of viewmodel objects. How can I subscribe to the Property Changed event of each view model in my collection as they are created and track which ones have been changed, so that I can updated them to my database. ...

How to get the Row and Column count of a grid in C#?

How to get the Row and Column counts of grid in C#, just regular window control grid, not datagrid or gridview Thanks ...

UI not redrawing after display powered off on Win 7

Some portions of my application's interface are not getting refreshed after Windows 7 powers down the display. More specifically, I'm swapping out images, User Controls, and a button's content while the display is powered off and after it has been restarted, and this isn't being reflected in the UI until I minimize and restore the window...

WPF: How to bind and update display with DataContext

I'm trying to do the following thing: I have a TabControl with several tabs. Each TabControlItem.Content points to PersonDetails which is a UserControl Each BookDetails has a dependency property called IsEditMode I want a control outside of the TabControl , named ToggleEditButton, to be updated whenever the selected tab changes. I tho...

WPF Linear Fill

Hi, I have found some example code that creates a gradient fill in a WPF rectangle control: <Rectangle Height="{Binding ElementName=txtName}" Width="{Binding ElementName=txtName}"> <Rectangle.Fill> <LinearGradientBrush> <GradientStop Color="...

using a database and deploying the application

I have a WPF application that stores a large amount of information in XML files and as the user uses the application they add more information to the XML files. It's basically using the XML files as a database. Since over the life of the program the XML files have gotten quite large, and I've been think about putting the data on a websit...

ComponentResourceKey that uses DynamicResource for value

I'm trying to define a set of brushes using ComponentResourceKey notation that align themselves with the colors provided by the SystemColors object. Here's what I know how to do (I have an example that follows): 1) I know how to define an inline brush that uses the SystemColors object (Brush1 in my example) 2) I know how to define and...

WPF command/click argument

So I have a background in ASP.NET where a button could have a click handler or a command handler and then a command argument. That pattern was great for when you had a bunch of buttons that basically needed to execute the same block of code with only a slightly different argument. Is there a collary in WPF? From what I've seen of t...

How to get the row and column of button clicked, in the grid event handler?

Once the added button in grid(window control Grid, not Gridview or datagrid) is clicked, how to find which row and column the button is located in the grid event handler, like click event or some other events? Not the button click event handler #region Grid event handler setup myGrid.MouseEnter += new MouseEventHandler(m...

How to set the location of a WPF window?

I have a List View in which I have defined a custom cell as a user control. In the custom cell I given user hyperlink, I am showing a WPF dialog when user clicks on a hyperlink. I want WPF dialog comes just above the hyperlink.. Please let me know how can I acheive this or how to set the location of the dialog so that it just comes ab...