wpf

How to use a system color in a lineargradientbrush in wpf

I have a gradient background for my window <Window.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="0" Color="Black" /> </LinearGradientBrush> </Window.Background> I would like to replace the black gradient stop...

WPF memory Leak when removing TabItems from a TabControl

When I remove a TabItem from a TabControl, it still holds a reference to tab item. According to RedGate, this has something to do with EffectveValueEntry. What do I need to do to ensure the TabControl drops all references to the TabItem? ...

Is there a way of undoing a selection a user makes with the combo box?

In WPF 3.5, is there a property of the combo box will allow the user to undo the selection they've made? ...

Improving binding performance in WPF?

Hello All, I realize this question could be boiled down to "Why is my code so slow?" but I'm hoping to get more out of that. Let me explain my code. I have a class that implements INotifyPropertyChanged in order to do binding, and that class looks similar to this: public class Employee : INotifyPropertyChanged { string...

WPF: RibbonWindow is not being collected because of CommandManager

According to RegGate's memory profiler, my RibbonWindowis not being collected because CommandManager is holding a reference to us. Does this make sense and what can I do about it? EDIT: This appears to be specific to a RibbonWindow from Microsoft CTP. But still I would like to know why it happens. ...

Create a repeat symbol in XAML / WPF

Hello, I need to create a repeat symbol in XAML / WPF (procedural code would be ok too, though I'd prefer XAML if possible), something like the following, but I just need the not finished circle with the arrow (the white drawing in the button): http://www.vista-style-icons.com/libs/phone/repeat.htm I know how to create a circle in XAM...

MouseEnter event does not always raises

Hi all! I've got a weird problem. Forgive me if I'm mixing up terms but I'm still a beginner ;) The situation: In my WPF project I've got a canvas on which I draw Ellipse. I create the Ellipse in the XAML and add a MouseEnter event to it: <Canvas Width="600" Height="480" Name="canvas1" HorizontalAlignment="Left"> <Ellip...

Trouble with static vs non-static stuff in dependency properties... should I even be using DPs?

Hey, So I have a gauge that I've made that will be animating in either the clockwise or counter-clockwise directions. Every so often new data comes in to two dependency properties that I have set up. When the data in these properties changes, I want to do some calculations on both values to determine which direction (and by how much) th...

link for XAML WPF documentation which describes elements/attributes

I'm after a link to online Microsoft reference doco for the XAML elements/attributes that are used in WPF XAML? thanks ...

WPF DataGrid Binding to datatable

This is driving me nuts. I am creating a DataGrid in code and then binding it to a datatable. This is dynamic and the rows and columns will be different everytime the grid is created. Basically I loop through my datatable and create DataGrid columns for each column, like this: private static void CreateDataGridColumns(DataGrid datagr...

system.workareaproperty gives wrong values

Hi, I'm currently writing a program in c# wpf with a custom window. So because there has to be a custom maximizing state I want to get the height and width of the screen without the taskbar. the systemparamters.workarea property seemed to be the way to go, however the values that it has given me are wrong. Furthermore setting this as th...

Why do some WPF binding fail against IronRuby properties?

So, lets say I have two nearly identical classes in C# and Ruby: C# public class Test { public Test() { ImageLocation = "http://www.ironruby.net/@api/deki/site/logo.png"; } public string ImageLocation { get; set; } } Ruby class Test attr_accessor :ImageLocation def initialize @ImageLocation = ...

What is the difference between Send Message and Post Message and how these relate to C# ,WPF and Pure windows programming?

What is the difference between Send Message and Post Message ( in terms of pure windows programming) and how these relate to C# ,WPF and Pure windows programming? I am new to Threading and all related stuff so please excuse me for obvious quesiton . I need to dig out the externals of Threading .. Please let me know the links that help m...

target property must be a dependency property - why?

I understand that dependencies properties serve a major purpose in WPF. However I do not get the reasons behind the restriction that in binding, the target property must be a dependency property. Why can't it be any property? ...

WPF animation problem when using Storyboard from code

I'm working on a 3D carousel of flat, square tiles that will contain information. I'm working on animating this carousel to rotate when a person presses Next and Previous buttons. I've gotten it to work by using BeginAnimation on the Rotation property of the RotateTransform3D I applied to the carousel, but I can't seem to make a Storyb...

WPF Tab Control + Animations

I'm trying to style/animate a TabControl such that when a tab is selected, the old one fades out, and the new one fades/slides in. I have the tab control styled, to a point, but now I'm trying to work out how to animate the panel. Blend doesn't seem to be much help: there are references to styling "target-element", and references to "P...

How to deal with application resources

I`m using C# and WPF ... I`m asking this question as I have never found a solution to my previous questions!! so I want to add an empty access database file to the application resources and to copy it to a specific location, I want to know how to add/retrieve the file from the resources ... also, is there a way to update the file during ...

GoToState always returns false

Hi, I have created a user control with a control template (containing VisualStateGroups definition), and also have an accompanying c# class. ie Public Class MyClass: UserControl{......} I have hooked up the usercontrol mouse enter and mouse leave to go to their relative visual states....and this works. When i run the app, and mouse ...

WPF - how to change XAML and get an immediate view of the affect in VS2010 without compiling/running?

Is there a way to get an immediate feedback/view of the impact of changing XAML in a WPF application? i.e. without having to recompile/run? In VS2010. In particular I ask this as I'm using the Charting from the WPF Toolkit library, and I'd like to be able to see the change in the UI I make after changing various charting sytles et...

How to get mock data into listview during design time and real data at run time in WPF

I am using Visual Studio 2008 writing a WPF application. I am new to WPF and would like to be able to see the contents of my listview at design time so that I can see what I am doing in the xaml, but bind to my real data at run time. My data is an observable collection of a simple model type object that exposes a few properties like Id...