wpf

Continuous ColorAnimation ?

I set up a nice ColorAnimation. When applying AutoReverse = true to it, it even goes from one color to another. Now I want it to change the color it animates to randomly after every completed runthrough. How can I achieve this? btw. I'm attaching my Animation to a storyboard: storyboard.RepeatBehavior = RepeatBehavior.Forever; storybo...

Multiple animations in a Storyboard at the same time?

I created a few ColorAnimations and want them to run at the same time (whether they run syncronized doesn't matter). Sadly only one of them runs. storyboard = new Storyboard(); //Animation Auditorium ColorAnimation SpotLightAnimation = new ColorAnimation(); SpotLightAnimation.To = Color.FromArgb(1, Conver...

Need help implementing multithreading into my TreeView (C#, WPF)

Okay, I have a TreeView that serves as a directory tree for Windows. I have it loading all the directories and functioning correctly, but it is pausing my GUI while it loads directories with many children. I'm trying to implement multithreading, but am new to it and am having no luck. This is what I have for my TreeView: private readon...

Repost of previous question: MediaElement in WPF

I am looking for a solution for a question that was already posted but did not answer correctly, thanks in advance. http://stackoverflow.com/questions/1346886/show-first-frame-of-video-in-wpf-mediaelement ...

WPF Datagrid / Datatable: Large number of rows

I have a Datagrid connected to Datatable, which needs to load a very large amount of rows. To speed things up, I load 10% of the rows, and display the form. Most of the time the user only needs those 10% (they are the most recent entries). In a background thread I load the remaining 90% of the rows into another datatable (SecondData). ...

ReportViewer 9 in .NET 4 application possible?

I am using ReportViewer 9 in WPF to talk to a remote SSRS server (because I have a SQL Server 2005 Reporting Services requirement) to add reports to a WPF .NET 4.0 application. I can create a project and run ReportViewer 9 using .NET 3.5, but I cannot (either from not being possible, or my lack or knowledge) get it to run within the WP...

WPF, MVVM and Prism modularity

I am still learning to use MVVM and Prism and have some general questions: I have a grid in my view. Lets say I have a button that when I click I want it to auto size the grid columns. Where would that code go? Resizing grid columns is a view thing and the view model shouldn't know about it. So in this case would I be adding the bu...

Authenticating ASP.NET MVC user from a WPF application

Hello, How can I authenticate a user (with username and password) of an ASP.NET MVC application? I'm trying to do this using WebClient, passing NetworkCredentials, posting the request to the ASP.NET MVC application from my WPF client. How do I handle this request on the server? How do I get the passed username and password? I'm using f...

Wpf DataGrid - Adding new rows only when I want them

I have a datagrid with two columns a and b. Column b represents a percentage. I want to have a single editable row at the start, and have them fill in column a and b. In the case that column b is less than 100%, I want to add a new editable row. I want to always add a new row when the total percentage is less than 100%. Any ideas on h...

WPF combobox value and display text

I'm used to doing things like State.Items.Add(new ListItem { Text = "SomeState", Value = NumericIDofState }); Where State is a Listbox in ASP.NET. How do i achieve the same with a WPF ComboBox? I do see a property called 'Content' in the ComboBoxItem object but how do i assign each item a value other than what's displayed to the use...

wpf dragout on image which is on canvas

I have a many images on canvas in wpf.. i want to drag the image in canvas and drop out.. only dragin options are there.. how to implement dragout on image which is on canvas? ...

WPF control retained in memory due to DispatcherTimer EventHandler

Yo One of my WPF control is retained in memory due to one of its private member. The incriminate member is a DispatcherTimer and the retention is because of the Tick event handler. (This leak was detected with help of the tool ANTS Memory Profiler) Obviously, I set/remove the handler on load/unload. And the control is unloaded... voi...

Single line borders in FlowDocument Tables

I have a FlowDocument table where I want to spice up the layout a bit. I'm thinking something like a thin line separating the sub amounts on an invoice from the total or something like the line under the header row typically featured in the standard Word 2007+ table styles. I was hoping that I could just add an empty TableRow and set the...

Animate Listview when scroll event ocurr in wpf?

Hi I Make this simple list-view(with sample Code's). Also I used styled repeat-Button. so this list view work well but, for scrolling objects within listbox it scroll whole object to down or up :) So I want to scroll object with animation, I mean scrolled part of object not whole object.(or any better animation) The question is how ...

How to set height of textblock/textbox to 3 lines?

I can set fixed height in pixels, but i'd like to set it in lines. Sort of like in html you can set height of an textarea to number of rows/lines. ...

How to make an object that would not participate in undo \ redo in richtextbox?

I have my usercontrol. I need to do that he would not seliarizovalsya with undo \ redo in richtextbox ...

WPF Datagrid Performance

I have a very large comma-seperated text-file. I need to display this in a WPF Datagrid, which method would result in the highest performance of loading all the data to the grid? I'm only aware of two methods: Using a Datatable, and adding each line as row (looks like overkill) Using an ObservableCollection, creates object for each lin...

How to minimize owner window when a modal is showing?

I have an application which on the first load it will show a modal window for user login (a borderless window). Now when the user wants to minimize the application by clicking the minimize button of the main window, it can't be done cause the main window is locked by the modal window. When the user tries to click the application taskbar ...

Converting XAML to XBAP

I have already created a project using WPF Application and it is running smoothly but now i am requested to change it into Browser based project. For this i consulted the web and developed the WCF service for the data communication. Currently my WPF Project is running under WCF data communication using LINQ. But the real thing is, i am n...

WPF Chart Legend Item Style

Hello, I am trying to style the Legend Items in my WPF Chart. I have the following LegendStyle, but this doesn't change anything. What am I doing wrong? Thanks! <Style x:Key="LegendStyle1" TargetType="{x:Type datavis:Legend}"> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style TargetType="charting:Leg...