wpf

Assigning AutomationId to a ReportViewer control (hosted in WPF)

Hi, I'm trying to do some UI testing using the White UI Automation framework, but I've run into a bit of a challenge when trying to get a handle to a WinForms ReportViewer control. The application is WPF-based and so we use a WinFormsHost control to host the ReportViewer control. But when I try to set a AutomationProperties.AutomationId...

Hyperlinks in contextMenues (wpf, partial trust) didn't work

Hi guys, I got a problem. I have a contextmenu and it's items are hyperlinks. If I click on those nothing happened. They are OK, because if I add them to a grid they work fine. Anybody an idea how to solve this? I am in an partialTrust environment ... so Process.start is not running. ...

Windows Application vs Web Application development

Just trying to get a more thorough understanding of the major differences between windows(desktop) application and web application development. All my knowledge and experience has been as a web application developer, with c# and the .net framework. I am interested to know if it's common for developers to be skilled in both areas, i.e. WP...

Adding "Loading"-image on top of ListView

I'd like to add a "Loading"-image on the top of my ListView while all items are loading, if there are a lot of items being loaded, I still want a nice user experience. So therefore I want a floating Image ( Animated GIF ? ) on top of my ListView. How would one solve this and once you have the floating image or control, how do you make ...

Dynamic animations, Commands and separation of concerns

Scenario: I have a (numeric) textbox, a button, and a label. When the button is clicked I'd like the label to "animate" to the numeric value in the textbox (like a spinning dial) Given: a) that animations in storyboards cannot have databindings (because they are not FrameworkElements) b) the lack of triggers in Silverlight What is the...

How do I populate a WPF Combobox with XPath queries stored in a file?

I have two files -- the first (data) is an XML document, and the second (queries) contains XPath queries I would like to run on the first document. I would like to populate a combobox in WPF to the queries, so that it displays the names of the XPath queries. When the user selects an item in the combobox, it should populate a listbox wit...

Stackpanel with multiple expanders

Hi I have a stackpanel with multiple expanders: <StackPanel Margin="0,10,0,0"> <Expander Header="Test 1"> <ListBox> <ListBoxItem Content="Unit 1"/> <ListBoxItem Content="Unit 2"/> </ListBox> </Expander> <Expander Header="Test 2"> <ListBox> <ListBoxItem Content="Unit 3"/> <ListBoxItem ...

Csla.Luna, what's this?...

I have this wpf form; the call to InitializeComponent() brings up this message: Binding Failure was detected. The assembly with display name 'Csla.Luna' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assemb...

WPF Ribbon ApplicationMenu Alignment on the Right?

When going through a tutorial, the 'ribbon.ApplicationhMenu' always comes up on the left hand of the screen, rather than the right, as it does in Office 2007, Paint (on Windows 7), and WordPad (on Windows 7). Is there some way to change this? Thank you (Example of the issue is here http://cid-a45fe702de180b23.skydrive.live.com/self.a...

Fade transition between styles

I have a label control where I use a converter to switch its styles based on a bool property, IsCheckedOut on my viewmodel, like so: <UserControl.Resources> <Converters:BooleanStyleConverter x:Key="BooleanStyleConverter " StyleFalse="{StaticResource HeaderLabelStyle}" StyleTrue="{StaticResource HeaderLa...

Allowing to add elements to a list in xaml

I've created a custom control that I insert into my window with the following code <controls:ListExpander Text="Class Diagrams"></controls:ListExpander> The control in question contains several subcontrols, among others, a list. How can create the setup, so I can specify items that should be added to the list? Eventually I'm looking f...

Increasing or decreasing control fontsize on runtime according to Slider(WPF component) value

Hello, I want to increase or decrease font size of controls such as window, treeView, ribbon menu etc that are contained by main window. I have a font size slider create method and I want to acces all of Control and TextBlock by using visualtree helper and increase or decrease their font size according to slider value. Methods are be...

How can I set the selected property in a custom user control which inherits XAML ComboBox?

I've built a custom user control which inherits ComboBox and has items which are KeyValuePair<bool, string> I want to set the boolean default value of this ComboBox so that when true it shows "Yes" and when false it shows "No". In the code below, when I set the selected value to true, then the ComboBox correctly shows "Yes". But wh...

WPF Accept input without focus

I've created a screen in WPF that accepts input from a barcode scanner. I listen to PreviewTextInput event, and the KeyUp event, which let's me determine what the scanner "typed", and when it finished. It works great. You just have to have the form displayed and it will accept barcode scans. The problem is, I have other controls on the ...

WPF Datagrid "Select All" button - "Unselect All" too?

Hi, I would like to know if it would be possible to add functionality to the 'Select All' button in the top left of a datagrid so that it also unselects all rows? I have a method attached to a button which does this, but it would be great if I could fire this method from the Select All button, to keep functionality in the same part of t...

Why do I get a XamlParseException when I inherit a Custom UserControl in another project?

In one project I have an Editor Class: namespace TestXamlInherit234 { public class CustomerEditor : BaseEditor { public CustomerEditor() { TheMessage.Text = "changed222"; } } } which inherits from a WPF User Control in another project: using System.Windows.Controls; namespace Core { ...

With WPF, how to link an animation with a ContentControl?

I don't know how to link successfully a StoryBoard to a TranslateTransform that is part of a ContentControl. I always get the following error when I try to run my StoryBoard: 'RenderTransform' property does not point to a DependencyObject in path '(Children).[0].(Content).(0).(1)'. I guess I don't know how to define a TargetPropert...

Pulling multiple live video streams into WPF

I'd like to create an app that pulls multiple live video feeds, supplied either by coax, hdmi or some other standard, into WPF for manipulation (i.e. apply a few transforms or pixel shaders) which is then output to monitor. What would I look at to get started with this app - is there any hardware that would make things easier? ...

Data grid checkbox automation.

Hi, I have a datagrid with a check box. When I click n the cell, I would like the checkbox to be automatically checked when I selected the cell which contains it. what it's doing right now is that I need to select the cell then click on the checkbox and that is quite annoying for us. <dg:DataGrid Name="GridUsureOperation"...

Data reader is incompatible... member does not have corresponding column in data reader.

Using VS 2008, SQL Server 2008 and WPF 3.5, I've made some changes to my schema and updated the model. It compiles and runs fine, until the client app calls for a specific entity and I get the following (actual names replaced): The data reader is incompatible with the specified '<Model>.<ViewBasedEntity>'. A member of the type, '<Prope...